[issue32448] subscriptable

2018-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that a better message would be nice. But compiling 'a.b[c]' breaks the expression apart into the equivalent of 't=a.b; t[c]', where 't' is an anonymous reference, so as David notes, there is no 'name' left to display. We don't

[issue32448] subscriptable

2017-12-30 Thread R. David Murray
R. David Murray added the comment: Well, in that case having 'organizer' in the error message wouldn't help you untangle your code ;) -- ___ Python tracker

[issue32448] subscriptable

2017-12-30 Thread Alexander Mohr
Alexander Mohr added the comment: oh for second example I meant something like this: >>> class Foo: pass >>> Foo.organizer = None >>> Foo.blah = Foo >>> Foo.blah.organizer = None >>> Foo.blah.organizer[0] ya this is just a pie in the sky request :) --

[issue32448] subscriptable

2017-12-29 Thread R. David Murray
R. David Murray 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

[issue32448] subscriptable

2017-12-29 Thread Alexander Mohr
New submission from Alexander Mohr : Currently subscriting a attribute that's None reports the following: >>> class Foo: pass >>> Foo.organizer = None >>> Foo.organizer['start'] Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not