variable scope
Bruno Desthuilliers
bruno.42.desthuilliers at websiteburo.invalid
Mon Sep 28 04:37:26 EDT 2009
Joel Juvenal Rivera Rivera a écrit :
> Yeah i forgot the self an try the code then i see
> an error that it was not defines _uno__a so that's
> where i define the global and see that behavior.
>
(snip)
>> Joel Juvenal Rivera Rivera wrote:
>>> Hi i was playing around with my code the i realize of this
>>>
>>> ###################
>>> _uno__a = 1
>>> class uno():
>>> __a = 2
>>> def __init__(self):
>>> print __a
>>> uno()
>>> ###################
>>> and prints 1
>>>
Looks like a bug to me. I Think you should fill a ticket...
More information about the Python-list
mailing list