On Fri, 21 Feb 2014 19:49:20 -0700 Eric Snow <ericsnowcurren...@gmail.com> wrote: > On Fri, Feb 21, 2014 at 7:07 PM, Victor Stinner > <victor.stin...@gmail.com> wrote: > >> Consider this example of a two-level cache:: > >> for key in sequence: > >> x = (lvl1[key] except KeyError: (lvl2[key] except KeyError: > >> f(key))) > >> # do something with x > > > > ... but I don't like when it is used to build complex expressions. > > This is true of any expression syntax, not just this proposal--though > some expression syntax is more apt to be abused than others: you won't > see many multiline int literals! ;)
But this is precisely why Python has refrained from making everything an expression. For example, why assignements are not expressions. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com