best way to increment an IntVar?

Alan G Isaac alan.isaac at gmail.com
Fri Jun 25 13:37:48 EDT 2010


On 6/25/2010 1:14 PM, Dave Angel wrote:
> the default behavior of += is to assign a new object with the new value,
> rather than changing the previous object.

>>> a = []
>>> temp = a
>>> a += [2]
>>> temp
[2]

Alan Isaac




More information about the Python-list mailing list