[Python-Dev] [PEP] += on return of function call result
Jeff Epler
jepler@unpythonic.net
Fri, 16 May 2003 07:34:42 -0500
It seems almost within the bounds of possibility that pychecker
could learn to find bugs of the form
t = expression # t results from computation
t += i # inplace op on (immutable/no-__iadd__) t
del t # or t otherwise not used before function return
by doing type and liveness analysis on t. (the type analysis being the
hard part)
Is there any time that the described situation would not be a bug? I
can't see it.
Jeff