[issue29855] The traceback compounding of RecursionError fails to work with __get__

2017-03-19 Thread Nick Coghlan
Nick Coghlan added the comment: Indeed, the traceback abbreviation doesn't try to detect recursive loops, only exactly duplicated lines. The problem is that the more state management we do in the traceback printing, the higher the chance there is of getting an error while attempt to display th

[issue29855] The traceback compounding of RecursionError fails to work with __get__

2017-03-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +ebarry, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29855] The traceback compounding of RecursionError fails to work with __get__

2017-03-19 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I'm pretty sure this is by design; the change introduced in [1] tried to keep things simple by only trimming the output when the lines were identical. More complicated scenarios are trickier to implement. It should be interesting to see if the core-dev

[issue29855] The traceback compounding of RecursionError fails to work with __get__

2017-03-19 Thread assume_away
New submission from assume_away: class Property: def __init__(self, getter): self.getter = getter def __get__(self, instance, cls): return self.getter(cls if instance is None else instance) class MyClass: @Property def something(cls): return cls.something