Guido van Rossum wrote: >> What was your opinion on "where" as a lambda replacement? i.e. >> >> foo = bar(callback1, callback2) where: >> def callback1(x): >> print "hello, " >> def callback2(x): >> print "world!" > > I don't recall seeing this proposed, but I might have -- I thought of > pretty much exactly this syntax in the shower a few days ago.
Gee, the time machine again! Lots of proposals on c.l.py base on the introduction of "expression suites", that is, suites embedded in arbitrary expressions. My opinion is that one will never find a suitable (;-) syntax, there's always the question of where to put the code that follows the suite (and is part of the same statement). yours, Reinhold -- Mail address is perfectly valid! _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com