On Monday 10 February 2003 03:06 am, Ka-Ping Yee wrote: ... > It's not just that it's out of order -- it's that something gets > short-circuited out of order. The whole idea of the very *first* > thing you see getting short-circuited is unacceptably weird and > unexpected for me. Forms such as: [ f(23) for f in stuff if callable(f) ] have been in Python for years now, and you could indeed say "the very first thing you see" (the call f(23)) is "getting short-circuited" by an if-guard at the very end. If ternaries had syntax similar to list comprehensions (but with mandatory if and else clauses and no for clause, instead of a mandatory for clause and optional further clauses), as in: [ f(23) if callable(f) else None ] then people's familiarity with LCs (very popular constructs) might help alleviate the "unexpectedness". (Pity about the brackets where no lists nor indexing nor slicing are involved ). Alex
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