> On Wed, 09 Feb 2005 17:42:41 -0800, rhettinger at users.sourceforge.net > <rhettinger at users.sourceforge.net> 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. >>> [] in frozenset(["hi", "ho"]) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: list objects are unhashable The compiler do bail out when there are unhashable objects outside the tuple, but not if the LHS is unhashable. I believe that is because internally frozenset uses a dict and it does something similar to d.has_key([]) in this case. It should be trivial for the compiler to also check the LHS for hashability I think. That is also why the email unit test failed - LHS was unhashable but the RHS was hashable. There is a patch for that (1119016) at SF but that may no longer be needed. -- mvh Björn
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4