[Baypiggies] A few decorator questions...

Charles Merriam charles.merriam at gmail.com
Thu Feb 26 08:36:15 CET 2009


In the spirit of just in time research for the newbie nugget tomorrow:

What decorators do most people actually use?  I expect everyone to use
the built-in @classmethod, @staticmethod, and @property.   Also, I
expect usage of many of the recipes from
http://wiki.python.org/moin/PythonDecoratorLibrary, like @memoize or
@trace.   Also, many different frameworks provide decorators for use
with that framework.  Am I missing something obvious?

Also, there had been some chatter about making a standardized
variable, like __decorators__[] which would hash the doc strings of
each decorator used into a well behaved array of hashes.  The
arguments weren't the strongest, and from the lack of support in
@functools.wrap, I assume it never occurred.

Finally, several people from a well known search company had said the
company banned use of decorators internally.   If you are with that
search company and can let me know the rational, I'd be curious.  You
can email me off list if you prefer.

I'm trying to finish a couple interesting class decorators for examples.

Have a great day,

Charles Merriam
charles.merriam at gmail.com


More information about the Baypiggies mailing list