Static variable vs Class variable
Laszlo Nagy
gandalf at designaproduct.biz
Wed Oct 10 05:38:28 EDT 2007
Steven D'Aprano írta:
> On Tue, 09 Oct 2007 21:25:38 +0200, Laszlo Nagy wrote:
>
>
>> a = 1
>> a+= 1 # The compiler will probably optimize this and the Python bytecode
>> interpreter will not rebind 'a' here, just increment the integer in
>> memory.
>>
>
> No. This is Python, not C. You can't increment integers in memory.
>
What? Please read my post. I was talking about __implementation level__,
clearly. :-)
More information about the Python-list
mailing list