Message439
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'
>>>
|
|
Date |
User |
Action |
Args |
2008-02-20 17:16:55 | admin | link | issue476580 messages |
2008-02-20 17:16:55 | admin | create | |
|