Ignore:
Timestamp:
03/23/11 11:30:32 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
2faf3b4037a1c30423a41ae7a3017c22639199ea
Message:

Included deprecation functions to the rst documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/misc/__init__.py

    r7777 r7778  
    245245 
    246246 
    247 """\ 
    248 Deprecation utility functions. 
     247__doc__ += """\ 
     248============================= 
     249Deprecation utility functions 
     250============================= 
     251 
     252.. autofunction:: Orange.misc.deprecation_warning 
     253 
     254.. autofunction:: Orange.misc.deprecated_members 
     255 
     256.. autofunction:: Orange.misc.deprecated_keywords 
     257 
     258.. autofunction:: Orange.misc.deprecated_attribute 
    249259 
    250260""" 
     
    252262import warnings 
    253263def deprecation_warning(old, new, stacklevel=-2): 
     264    """ Raise a deprecation warning of an obsolete attribute access. 
     265     
     266    :param old: Old attribute name (used in warning message). 
     267    :param new: New attribute name (used in warning message). 
     268     
     269    """ 
    254270    warnings.warn("'%s' is deprecated. Use '%s' instead!" % (old, new), DeprecationWarning, stacklevel=stacklevel) 
    255271    
     
    283299        be wrapped). 
    284300    :type wrap_methods: list 
     301     
     302    :param in_place: If True the class will be modified in place, otherwise 
     303        it will be subclassed (default True). 
     304    :type in_place: bool 
    285305     
    286306    Example :: 
Note: See TracChangeset for help on using the changeset viewer.