in place functions from operator module
ernest
nfdisco at gmail.com
Sun Aug 29 10:44:47 EDT 2010
Hi,
The operator module provides separate functions for
"in place" operations, such as iadd(), isub(), etc.
However, it appears that these functions don't really
do the operation in place:
In [34]: a = 4
In [35]: operator.iadd(a, 3)
Out[35]: 7
In [36]: a
Out[36]: 4
So, what's the point? If you have to make the
assignment yourself... I don't understand.
Cheers,
Ernest
More information about the Python-list
mailing list