Issue1209
Created on 2008-12-17.15:07:32 by mcella, last changed 2009-03-30.17:13:15 by pjenvey.
File name |
Uploaded |
Description |
Edit |
Remove |
test_eq.py
|
mcella,
2008-12-17.15:07:31
|
test case |
|
|
msg3949 (view) |
Author: Michele Cella (mcella) |
Date: 2008-12-17.15:07:31 |
|
One very annoying thing I've noticed while working with jython has to do
with equality comparison operations, basically jython traps
AttributeError exceptions that can happen inside the __eq__
implementation and just returns False, while the error is on the
programmer side this behavior is very annoying since it makes almost
impossible to recognize the source of the error (I've lost a good amount
of time to find out my typo on the __eq__ implementation).
I've attached a small test case to show the problem:
$ python test_eq.py
test... ok
$ jython2.5 test_eq.py
test... failed
Note that here I've tested only __eq__ but I think the problem is more
extended than just __eq__ and is probably related to any special method
(http://docs.python.org/reference/datamodel.html#specialnames).
I haven't yet found the time to also test if properties, getattr,
setattr and hasattr are all coherent with the CPython behavior, I'm
mentioning them since I remember there is something tricky going on
there also, see
http://www.mail-archive.com/python-3000@python.org/msg11630.html for
more links and info.
|
msg4388 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2009-03-30.16:41:36 |
|
This was broken by this: http://fisheye3.atlassian.com/changelog/jython/?
cs=2556
reverting it doesn't seem to break test_class, running it through the
regrtest now..
|
msg4389 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2009-03-30.16:42:06 |
|
that is r2556
|
msg4391 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2009-03-30.17:13:15 |
|
reverted r2556 in r6124, fixed
thanks
|
|
Date |
User |
Action |
Args |
2009-03-30 17:13:15 | pjenvey | set | status: open -> closed resolution: accepted -> fixed messages:
+ msg4391 |
2009-03-30 16:48:20 | fwierzbicki | set | assignee: fwierzbicki -> |
2009-03-30 16:42:06 | pjenvey | set | messages:
+ msg4389 |
2009-03-30 16:41:36 | pjenvey | set | nosy:
+ pjenvey messages:
+ msg4388 |
2009-03-14 03:11:40 | fwierzbicki | set | priority: high assignee: fwierzbicki |
2008-12-17 19:44:00 | fwierzbicki | set | nosy:
+ fwierzbicki resolution: accepted |
2008-12-17 15:18:21 | mcella | set | components:
+ Core |
2008-12-17 15:18:08 | mcella | set | type: behaviour severity: normal -> major versions:
+ 2.5b0 |
2008-12-17 15:07:32 | mcella | create | |
|