Steve Holden <[EMAIL PROTECTED]> wrote:
[...]
> Having to write
> 
>      [x for x in seq]
> 
> to produce a copy of a list doesn't seem that outrageous to me, and I 
> don't find the predicate-less case of your proposal that convincing:
> 
>      [x in seq]
> 
> seems somehow too terse.

And is already valid Python syntax; producing a list of a boolean (if x
is bound), a TypeError (if seq is a dictionary, x is bound, and x isn't
hashable), or a NameError (if x is not bound).

If I recall, changing the meaning of valid Python syntax is to be
frowned upon, and the suggestion should be tossed out the window
strictly because of that reason.  As for "for x" or its equivalent,
being too much additional overhead to type in list comprehensions, I
think maybe we are getting too picky for our own good.

 - Josiah

_______________________________________________
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

Reply via email to