Message1381
The patch makes the hash value for all unhashable PyObjects 0. Combined with the way GlobalRefs are used in a hashtable, this means that creating refs for two equal but distinct objects will only make a single ref. This is undesirable as illustrated in the example I'm attaching: calling the second ref returns the first object.
The only solution I can think of is to use System.identityHashCode(object) instead of object.hashCode(). As long as there isn't a case where Jython creates two separate Objects that refer to the same underlying Python object that should be fine. I can't think of anything like that off the top of my head.
File Added: surprising_assignment.py |
|
Date |
User |
Action |
Args |
2008-02-20 17:17:39 | admin | link | issue1622207 messages |
2008-02-20 17:17:39 | admin | create | |
|