Why no "=" in if? (was Re: Quick fix to add "+=")

Lars Marius Garshol larsga at ifi.uio.no
Sat Apr 17 11:13:18 EDT 1999


* Aahz Maruch
| 
| x = foo()
| if x:
|     ...
| 
| instead of 
| 
| if x = foo():
|     ...
| 
| Why doesn't Guido get off his duff and fix this?????????!

What's so wrong about it? Personally I seriously dislike assignments
that return values (at least in conventional languages).

--Lars M.




More information about the Python-list mailing list