Why no lexical scoping for a method within a class?
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Wed Dec 17 19:54:09 EST 2008
On Wed, 17 Dec 2008 22:19:43 +0100, Bruno Desthuilliers wrote:
> Your
> problem is that you are confusing variables and attributes. In Python,
> 'anything.anyname' (note the dot) is the attribute 'anyname' of object
> 'anything'.
An easy mistake to make, given that scopes are just namespaces, and
attribute access is just accessing names in namespaces too.
--
Steven
More information about the Python-list
mailing list