What does AttributeError mean?
Huaiyu Zhu
hzhu at yahoo.com
Fri Sep 22 04:02:47 EDT 2000
More information about the Python-list mailing list
Fri Sep 22 04:02:47 EDT 2000
- Previous message (by thread): What does AttributeError mean?
- Next message (by thread): code folding in PythonWin (scintilla)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 21 Sep 2000 19:10:34 +0100, Dale Strickland-Clark <dale at out-think.NOSPAMco.uk> wrote: >>>> srch.SQLString() >Traceback (innermost last): > File "<interactive input>", line 1, in ? >AttributeError: SQLString In 2.0, the error message is more understandable, like >>> class A: pass ... >>> a=A(); a.b() Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'A' instance has no attribute 'b' But it is slightly missleading because attributes could be set in instances instead of class. So why not? AttributeError: <__main__.A instance at 0x8270294> has no attribute 'b' Better still, if the actual calling name is still available in byte code, may be even AttributeError: instance a of class __main__.A has no attribute 'b' Huaiyu
- Previous message (by thread): What does AttributeError mean?
- Next message (by thread): code folding in PythonWin (scintilla)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list