Python 2.0b1 is released!
Oleg Broytmann
phd at phd.russ.ru
Wed Sep 6 11:14:54 EDT 2000
On 6 Sep 2000, Bernhard Reiter wrote:
> Well.. no. I even might prefer:
> i=dict["key"]
> i.attr=i.attr+12
dict["key"][k2] += 12 vs dict["key"][k2] = dict["key"][k2] + 12
You cannot shorten dict["key"][k2] += 12 to
i = dict["key"][k2]
i = i + 12
You only can
i = dict["key"]
i[k2] = i[k2] + 12
Which one is faster? :)
Oleg.
----
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list