[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread nother
nother added the comment: The first two exampel should produce the same result not throwing any exception. The third example should as it does report that prop is not available for instance. The fourth example should pass on the AttributeError raised for the not available attr2 instead of r

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread nother
nother added the comment: Ah sorry, sure. Attached some examples hope they are not too artificially simple to still render real world scenarios. The one loaded was just the test that a function called from within the except block inside another method can use raise keyword to reraise excepti

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: Could you supply a *simple* demonstration of a class showing this problem? I've looked at the uploaded "test6.py" (what happened to the other 5?) and don't see anything to do with either __getattr__ or property in it. -- nosy: +steven.daprano versio

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread nother
New submission from nother : Not sure where to file this suggestion properly and how. Currently when mixing attributes and properties it can happen that an AttributeError not raised intentionally by @property getter can cause @property to vanish from from classinstance. This happens when on t