On Wed, 21 Sep 2005, Thomas Lotze wrote: > Barry Warsaw wrote: > > >> x = (if a then > >> b > >> elif c then > >> d > >> else > >> e > >> ) > [...] > > > > I guess that's my point. To me, your latter is actually worse than > > > > if a: > > x = b > > elif c: > > x = d > > else: > > x = e > > Can't see a difference as far as readability is concerned. But then, > tastes differ. [...]
With the former, we have a more C-style syntax where meaning is determined purely by delimeters rather than by whitespace. Instead of braces '{' and '}', we have 'then' and 'elif'/'else'. That's a real difference. The stricter form where you don't allow 'elif' will get used in more restricted circumstances, so gives less encouragement for widespread abuse of conditional expressions by people who don't like whitespace-based syntax. John _______________________________________________ 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