Message569
Hello,
I have noticed a strange behavior of Jython.
Consider the following program:
class c:
def m(self):
pass
i = c()
d = {}
d[i.m] = 42
d[i.m] = 23
print d
Result for CPython 2.1.1:
dirk@susi:~/python> python test.py
{<method c.m of c instance at 0x80e6394>: 23}
With Jython 2.1 and Sun Java2 1.4rc1 however:
dirk@susi:~/python> ../jython-2.1/jython test.py
{<method c.m of c instance at 16348303>: 23, <method
c.m of c instance at 16348303>: 42}
It seems that method instances are no longer unique,
once entered as key into a dictionary.
Cheers,
Dirk
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:01 | admin | link | issue515497 messages |
2008-02-20 17:17:01 | admin | create | |
|