[Python-Dev] accumulator display syntax

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Oct 16 20:07:38 EDT 2003

Alex Martelli <aleaxit at yahoo.com>:

> Then list comprehensions were introduced and the syntax admitted
> inside [ ] got far wider, in "list display" cases only.  Why would it be
> a problem if now the syntax admitted in the "similar syntax, different
> semantics" case of "indexing" got similarly wider?

List comprehensions extended the semantics of list construction by
providing new ways to specify the contents of the list.

Extended slice notation extended the semantics of indexing by
providing new ways to specify the index.

What you're proposing hijacks the indexing syntax and uses it to mean
something completely different from indexing, which is a much bigger
change, and potentially a very confusing one.

So, no, sorry, it doesn't overcome my objection!

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list