Raymond Hettinger added the comment:

This has come up once before and it was rejected for several reasons including 
the one David mentioned.

In Python, code reads more clearly with the usual:

   for elem in iterable:
       if elem not in seen:
           seen.add(elem)
           do_something(elem)

Than with:

   for elem in iterable:
       if not seen.add(elem):
           do_something(elem)


That latter is less self-evident about what it does.

Also, I think there were lessons drawn from Guido's decision to not incorporate 
the C-language feature of both assigning and testing in a conditional:  

    while((c = fgetc(fp)) != EOF)

----------
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22879>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to