decorators as generalized pre-binding hooks

Kay Schluehr kay.schluehr at gmx.net
Mon Jul 11 17:56:51 CEST 2005



Christopher Subich schrieb:
> Kay Schluehr wrote:
> > I think it would be a good idea to pronounce the similarity between
> > function decorators and metaclasses. Metaclasses were once introduced
> > as an arcane art of fuzzy bearded hackers or supersmart 'enterprise
> > architects' that plan at least products of Zope size but not as a tool
> > for the simple programmer on the street. But maybe they should be and
> > there should also be librarys of them representing orthogonal
> > customizations ready for plug in.
>
> In which case, I point out the need for better, more accessible
> documentation.  The Python 2.4 tutorial, for example, doesn't mention
> them at all as far as I've noticed.

That's true also for properties and decorators - the latter may be
excused because they are new in Python 2.4. There are a few good
documents out there explaining advanced stuff e.g. mro and descriptors.
Maybe those texts should be delivered with the doc and linked from the
tutorial as "further reading"? But maybe the whole document structure
could be redesigned providing a Wikipedia style with seperated but
linked articles, example code etc. ?

Kay




More information about the Python-list mailing list