=- and -= snag

aapost aapost at idontexist.club
Mon Mar 13 23:09:20 EDT 2023


On 3/13/23 17:26, Morten W. Petersen wrote:

> It went into negative numbers,
> when that shouldn't have been possible.
> 
> Turns out I had a very small typo, I had =- instead of -=.
> 
> Isn't it unpythonic to be able to make a mistake like that?
> 

That is why I tell Alice it is always best to stay positive and use 
x-=-1 to avoid situations like that. *shrugs*



More information about the Python-list mailing list