Message215325
We'll have to wait for Nick to chime in, but I'll make a couple of comments.
First, I think this is a bug in partial, so I think we need to decide what, if anything, to do about that first, before we decide if signature needs to compensate for it or not.
The other comment is about ==/__hash__, in case that is involved in the solution: two objects may very well have the same __hash__ and *not* be equal, but they cannot have different __hash__es and *be* equal. The equality comparison algorithm uses __hash__ as a shortcut. If two objects have different hashes, they are not equal and we return False. If they have the same hash, then a full equality comparison is done before the result of __eq__ is returned. You will understand that this must be the case if you think about the nature of hashing: it throws away information. Cryptographic hashes used for identification are constructed such that the *probability* of a collision is very low, but it is still not zero, so how they are used is just as important as how they work. Our __hash__es are generally not that strong, so collision is likely. |
|
Date |
User |
Action |
Args |
2014-04-01 15:32:41 | r.david.murray | set | recipients:
+ r.david.murray, brett.cannon, ncoghlan, larry, yselivanov |
2014-04-01 15:32:41 | r.david.murray | set | messageid: <1396366361.89.0.745609595555.issue21117@psf.upfronthosting.co.za> |
2014-04-01 15:32:41 | r.david.murray | link | issue21117 messages |
2014-04-01 15:32:41 | r.david.murray | create | |
|