R. David Murray <rdmur...@bitdance.com> added the comment:

At the point at which that error is raised, Python doesn't know the name of the 
attribute, nor is attribute access the only place where that particular error 
report is triggered (it's in a generic subscript-this-object call).  So I doubt 
doing this would be practical.

As for Foo.organizer.blah[0], it has to be blah that is None, since 
'.organizer' is an attribute access and not a subscript operation.  The more 
difficult case is something like getattr(someobject, somevar)[0], where you 
can't tell what somevar contains just from the traceback.  Which is why some 
value-added systems also dump the locals from the frame in the traceback.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to