On Thu, Feb 06, 2003, Guido van Rossum wrote: >Aahz: >> >> Are they really equivalent? What about >> >> print h() if f() and g() >> >> versus >> >> if f() and g(): >> print h() >> >> Does g() get called if f() is false? What about h()? > > Do you know the ternary operator in C? Thanks to my handy K&R2, now I do. ;-) But I'm always suspicious when the proposed syntax doesn't have a simple L->R or R->L semantic, which is the main thing I don't like about listcomps. So I figured I'd make sure. After all, explicit is better than implicit, and that goes triple when human languages are used. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "Argue for your limitations, and sure enough they're yours." --Richard Bach
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4