This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | ncoghlan |
|---|---|
| Recipients | amaury.forgeotdarc, barry, eikeon, glyph, gvanrossum, jek, ncoghlan, rhettinger, schmir |
| Date | 2008年07月03日.10:50:31 |
| SpamBayes Score | 7.908485e-06 |
| Marked as misclassified | No |
| Message-id | <1215082233.77.0.298772541219.issue2235@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
As far as deque goes, the following behaviour on the trunk is the problem I am trying to fix: Python 2.6b1+ (trunk:64655, Jul 2 2008, 22:48:24) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from collections import deque, Hashable >>> isinstance(deque(), Hashable) True All of the container types that my patch touches were already unhashable in 2.5 - my patch just ensures that they all correctly return false for isinstance(obj, collections.Hashable) even after we make object.__hash__ inherited by default again. This is also the reason why simply reverting the trunk hash implementation to the 2.5 behaviour (which is what I first tried) is inadequate. Since collections.Hashable is new in 2.6, I can live with it returning the wrong answer for types which define __hash__ to always raise an error (that's a known limitation of the ABC system, even in Py3k). However, we should at least make sure it returns the correct answer for all of the types in the standard library. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年07月03日 10:50:34 | ncoghlan | set | spambayes_score: 7.90848e-06 -> 7.908485e-06 recipients: + ncoghlan, gvanrossum, barry, rhettinger, amaury.forgeotdarc, schmir, jek, eikeon, glyph |
| 2008年07月03日 10:50:33 | ncoghlan | set | spambayes_score: 7.90848e-06 -> 7.90848e-06 messageid: <1215082233.77.0.298772541219.issue2235@psf.upfronthosting.co.za> |
| 2008年07月03日 10:50:33 | ncoghlan | link | issue2235 messages |
| 2008年07月03日 10:50:31 | ncoghlan | create | |