Metadata-Version: 1.1
Name: cs.py.func
Version: 20150115
Summary: convenience facilities related to Python functions
Home-page: https://bitbucket.org/cameron_simpson/css/commits/all
Author: Cameron Simpson
Author-email: cs@zip.com.au
License: UNKNOWN
Description: Convenience facilities related to Python functions.
        ===================================================
        
        funcname(func)
        --------------
        
        Returns a string to name `func`. I use this instead of func.__name__ because several things do not have a .__name__. It tries to use .__name__, but falls back to ..__str__().
        
        @derived_property
        -----------------
        
        Decorator for property functions which must be recomputed if another property is updated.
        
        @derived_from(property_name)
        ----------------------------
        
        Convenience wrapper of derived_property which names the parent property.
        
        @returns_type(func, basetype)
        -----------------------------
        
        Basis for decorators to do type checking of function return values. Example::
        
          def returns_bool(func):
            ''' Decorator for functions which should return Booleans.
            '''
            return returns_type(func, bool)
        
          @returns_bool
          def f(x):
            return x == 1
        
        This has been used for debugging functions called far from their definitions.
        
Keywords: python2,python3
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Intended Audience :: Developers
Requires: cs.excutils
