On 4/20/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > There are still a bunch of tests failing in the py3k (sic) branch: > > test_class fails because hash() of a new-style class that defines > __eq__ or __cmp__ doesn't raise an exception. There's a design issue > here: should the default hash be changed to raise an exception in this > case (perhaps triggering other test failures) or should the tests be > deleted? (This is from a test module that used to test classic > classes.) >
I say raise an exception. iter() raises a TypeError if you pass it an object it can't get an iterator for. hash() should raise an exception for an object that cannot be used as a key in a dict. -Brett _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
