[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric
David Unric added the comment: Oops, this was the strict version. The lazy method call version behaves exactly like property getter. So there is probably no implementation bug, but not too well thought out decision design, making debugging AttributeError exceptions in properties difficult

[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric
David Unric added the comment: This looks a bit inconsistent. See following version with "manual" getter definition: class MyClass(object): def __init__(self, *args, **kwargs): # setting access to getter by attribute # without use of property decorator sel

[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric
David Unric added the comment: Thanks for the comprehensive response. I did suspected the 2nd call is caused how it has been described in paragraph 4. And you are probably right. Only think exception instance raised in __getattr__ should not lead to its another call but propagated to outer

[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric
New submission from David Unric: Hello, it seems python interpreter improperly handles AttributeError exception raised in __getattr__ method, after called by unresolved attribute inside a property. Bellow is a simple Python2 example of a class which defines __getattr__ method and a property