Re: in place functions from operator module

2010-08-30 Thread Arnaud Delobelle
Raymond Hettinger writes: > On Aug 29, 8:33 am, Arnaud Delobelle wrote: >> ernest writes: >> > 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 operatio

Re: in place functions from operator module

2010-08-29 Thread Raymond Hettinger
On Aug 29, 8:33 am, Arnaud Delobelle wrote: > ernest writes: > > 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 > >

Re: in place functions from operator module

2010-08-29 Thread Steven D'Aprano
On Sun, 29 Aug 2010 07:44:47 -0700, ernest wrote: > 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(

Re: in place functions from operator module

2010-08-29 Thread Arnaud Delobelle
ernest writes: > 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 >

Re: in place functions from operator module

2010-08-29 Thread ernest
On 29 Ago, 17:00, Peter Otten <__pete...@web.de> wrote: > ernest wrote: > > 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 > > >

Re: in place functions from operator module

2010-08-29 Thread Peter Otten
ernest wrote: > 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