[Paul] > I know there's been a long time request for this feature, > supposedly from people coming to Python from C, or any other language -- it's in Java, Perl, C++, Icon, Haskell, Lisp... People have been arguing for years how to do this. > but what's the real reason for adding it now, > without even a PEP ? > Does it really add enough to the language to justify the bloat ? We'll see about the PEP (I think it's a good idea to motivate the change). The language bloat is very small IMO -- much less than augmented assignment or list comprehensions, actually, and the benefits are quite substantial, when used judiciously. Like augmented assignment, the conditional expression matches how I *think* about certain situations; it's nice to finally be able to write them down right. It's especially useful in function arguments, in string formatting operations, or in lambdas (if you like lambdas :-). --Guido van Rossum (home page: http://www.python.org/~guido/)
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