Issue476580

classification
Title: 'del obj.non_member' : wrong exception
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bckfnn Nosy List: bckfnn
Priority: normal Keywords:

Created on 2001-10-31.00:25:03 by anonymous, last changed 2001-11-06.16:49:08 by bckfnn.

Messages
msg439 (view) Author: Nobody/Anonymous (nobody) Date: 2001-10-31.00:25:03
When trying to delete a non-existant member of an
instance, the wrong exception is raised.


Jython 2.1a1 on java1.3.1 (JIT: null)
Type "copyright", "credits" or "license" for more
information.
>>> class C : pass
... 
>>> o = C()
>>> o.foo
Traceback (innermost last):
  File "<console>", line 1, in ?
AttributeError: instance of 'C' has no attribute 'foo'
>>> del o.foo
Traceback (innermost last):
  File "<console>", line 1, in ?
KeyError: foo
>>>


Python 2.1.1 (#1, Oct 20 2001, 16:44:06) 
[GCC 2.95.4 20011006 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more
information.
>>> class C : pass
... 
>>> o = C()
>>> del o.foo
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: C instance has no attribute 'foo'
>>> 

msg440 (view) Author: Finn Bock (bckfnn) Date: 2001-11-06.16:46:14
Logged In: YES 
user_id=4201

Added as test335.py
msg441 (view) Author: Finn Bock (bckfnn) Date: 2001-11-06.16:49:08
Logged In: YES 
user_id=4201

Fixed in PyInstance.java: 2.27;
History
Date User Action Args
2001-10-31 00:25:03anonymouscreate