[Numpy-discussion] Casting Bug or a "Feature"?

Paul Anton Letnes paul.anton.letnes@gmail....
Thu Jan 17 01:14:47 CST 2013

On 17.01.2013 04:43, Patrick Marsh wrote:
> Thanks, everyone for chiming in.  Now that I know this behavior 
> exists, I can explicitly prevent it in my code. However, it would be 
> nice if a warning or something was generated to alert users about the 
> inconsistency between var += ... and var = var + ...
> Patrick

I agree wholeheartedly. I actually, for a long time, used to believe 
that python would translate
a += b
a = a + b
and was bitten several times by this bug. A warning (which can be 
silenced if you desperately want to) would be really nice, imho.

Keep up the good work,

More information about the NumPy-Discussion mailing list