__metaclass__ and __author__ are already decorators

Paul Morrow pm_mon at yahoo.com
Sat Aug 21 20:56:55 EDT 2004


Leif K-Brooks wrote:
> Paul Morrow wrote:
> 
>> So when we define an __xxx__ attribute inside of a function, we are 
>> trying to make a statement about the function --- we are not trying to 
>> create a local variable.  Therefore the Python system shouldn't create 
>> a local variable in this case; it should create a function variable 
>> instead (IMO).
> 
> 
> How do you think a newbie will react to magic behavior like that from 
> the assignment operator based entirely on the name being assigned to?

We must emphasize that they are assigning to a 'magic' variable, as all 
__xxx__ attributes are supposed to be.  One must be careful with magic :-)





More information about the Python-list mailing list