On Wed, 09 Feb 2005 17:42:41 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Update of /cvsroot/python/python/dist/src/Python > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31172 > > Modified Files: > compile.c > Log Message: > Remove the set conversion which didn't work with: [] in (0,)
Why is this a problem? If there were *any* unhashable objects in the container, then the compiler would have bailed on the initial set-conversion. If there aren't any unhashable values, then the (unhashable) item being checked is not in the set. ==> Return False. Are you worried about unhashable objects (as item) which compare == to something that is hashable (in container)? Custom rich compares can already confuse the "in" tests. Or is the problem that guarding against/trapping this case is somehow so expensive that it overrides the expected savings? -jJ _______________________________________________ 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