Global variables within classes.

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Fri Nov 30 13:48:12 CET 2007


Donn Ingle a écrit :

(about class attributes, instance attributes and lookup rules)
> Okay, I sort of see that. It's not a property

For clarity, better s/property/attribute/ here. In Python, property is a 
builtin class used for computed attributes.

> of 'j' so it looks upwards
> into the class. 
> This is kind of weird.

Given that methods and properties are (at least usually for methods) 
class attributes, this makes sens.

> It's not clear like Python usually is.

Mmm... It's certainly not obvious for newcomers, but this is easy to 
understand and IIRC well documented.

> Is this
> something intentional

Definitively, yes !-)



More information about the Python-list mailing list