Issue222796

classification
Title: Checking for an instance attribute have changed since 1.0.3.
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: bckfnn
Priority: low Keywords:

Created on 2000-11-18.18:56:43 by bckfnn, last changed 2000-11-18.22:00:20 by bckfnn.

Messages
msg29 (view) Author: Finn Bock (bckfnn) Date: 2000-11-18.18:56:43
Previously, a KeyError was raised. Now it returns false.


JPython 1.1beta1 on java1.2.1
Copyright ® 1997-1999 Corporation for National Research Initiatives
>>> from java import awt
>>> hasattr(awt.Rectangle, "getSize")
1
>>> hasattr(awt.Rectangle, "size")
0
>>> awt.Rectangle.__dict__.has_key("getSize")
1
>>> awt.Rectangle.__dict__.has_key("size")
1
>>>


JPython 1.0.3 on java1.2.1
Copyright 1997-1998 Corporation for National Research Initiatives
>>> from java import awt
>>> hasattr(awt.Rectangle, "getSize")
1
>>> hasattr(awt.Rectangle, "size")
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: instance attr: size
msg30 (view) Author: Finn Bock (bckfnn) Date: 2000-11-18.22:00:20
Not a bug. I've decided that the new behaviour is every bit as correct as the old.
History
Date User Action Args
2000-11-18 18:56:43bckfnncreate