[EMAIL PROTECTED] writes:

> Update of /cvsroot/python/python/dist/src/Python
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26507/Python
>
> Modified Files:
>       compile.c 
> Log Message:
> Transform "x in (1,2,3)" to "x in frozenset([1,2,3])".
>
> Inspired by Skip's idea to recognize the throw-away nature of sequences
> in this context and to transform their type to one with better performance.

This breaks code:

>>> [] in (1,)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: list objects are unhashable

(and so breaks test_email -- is noone else running the test suite?).

It's a cute idea, but IMHO violates the principle of least surprise
too much.

Cheers,
mwh

-- 
  ZAPHOD:  Who are you?
  ROOSTA:  A friend.
  ZAPHOD:  Oh yeah? Anyone's friend in particular, or just generally 
           well-disposed to people?               -- HHGttG, Episode 7
_______________________________________________
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