¡@

Home 

python Programming Glossary: func.__name__

Find functions explicitly defined in a module (python)

http://stackoverflow.com/questions/1106840/find-functions-explicitly-defined-in-a-module-python

inspect.getmodule func mod def list_functions mod return func.__name__ for func in mod.__dict__.itervalues if is_mod_function mod..

Python - Lazy loading of class attributes

http://stackoverflow.com/questions/17486104/python-lazy-loading-of-class-attributes

self func name None doc None self.__name__ name or func.__name__ self.__module__ func.__module__ self.__doc__ doc or func.__doc__..

Python decorator makes function forget that it belongs to a class

http://stackoverflow.com/questions/306130/python-decorator-makes-function-forget-that-it-belongs-to-a-class

args kwargs print Entering s. s args 0 .__class__.__name__ func.__name__ return func args kwargs return with_logging class C object @logger..

convert code from Python 2.x to 3.x

http://stackoverflow.com/questions/5497013/convert-code-from-python-2-x-to-3-x

func.func_code.co_filename func.func_code.co_firstlineno func.__name__ newtok.type lexdata lexpos What should this look like in 3.2.. func.func_code.co_filename func.func_code.co_firstlineno func.__name__ newtok.type lexdata lexpos raise LexError message Because formatting..

PicklingError when using multiprocessing

http://stackoverflow.com/questions/7016567/picklingerror-when-using-multiprocessing

His code is def _pickle_method method func_name method.im_func.__name__ obj method.im_self cls method.im_class return _unpickle_method.. if isinstance func types.MethodType arguments.insert 0 func.__name__ func target result pool.map_async func arguments chunksize chunksize..

Celery periodic_task running multiple times in parallel

http://stackoverflow.com/questions/7719203/celery-periodic-task-running-multiple-times-in-parallel

def wrapper args kwargs lock_id celery single instance func.__name__ acquire_lock lambda cache.add lock_id true timeout release_lock..

Python: changing methods and attributes at runtime

http://stackoverflow.com/questions/962962/python-changing-methods-and-attributes-at-runtime

@classmethod def addMethod cls func return setattr cls func.__name__ types.MethodType func cls def hello self n print n instance..