__metaclass__ and __author__ are already decorators
eurleif at ecritters.biz
Sat Aug 21 22:24:59 CEST 2004
Paul Morrow wrote:
> We just need to stop thinking of them as local function variables.
> Instead we should think of __xxx__ attributes as describing the function
> itself (i.e. as a decorator would), as I believe that is almost always
> the author's intention when he/she uses such names inside of a
> function/method definition. He wants to say something about the
> function (who wrote it, it's version, etc.), and is probably sad that it
> has the side-effect of creating a local variable. So it probably
> shouldn't have that side-effect anymore. It should create a function
> attribute instead (not to be confused with a local variable).
Which is, like I said, assigning new meaning to an old syntax. That
seems confusing to me; why not just create a new syntax?
More information about the Python-list