Closed Delgan closed 5 years ago
I've given this some thought and I think having blocking operations in __str__
or, even worse, __repr__
is an anti-pattern of sorts. I equate it to doing I/O inside draw calls on a rendering thread.
That's not really a use-case I think BE should support, personally.
Yeah, I think you are right. Thanks!
In #37, user noticed that its program was hanging forever because of exception formatting. Some weird asynchronous / recursive calls prevented
better_exceptions
to retrieverepr(value)
.I am not sure there is much we can do to fix it. However, I think we can ease for the user the process of identifying the issue by displaying
better_exceptions
tracebacks progressively.That is, if user remarks that its program is hanging forever, he will start investigating it, but I think it will take time before considering that the issue may come from the exception formatting. However, by printing the exception line by line on our side, the user will see
Traceback (most recent call last):
and then nothing. So, he will immediately jump to the conclusion that maybe something is going wrong inbetter_exceptions
hook.@Qix- Do you think it worth merging it?