Message439

Author nobody
Recipients
Date 2001-10-31.00:25:03
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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'
>>> 

History
Date User Action Args
2008-02-20 17:16:55adminlinkissue476580 messages
2008-02-20 17:16:55admincreate