Sergey B Kirpichev added the comment:

> What problem does replacing __displayhook__ provoke?

I don't know for sure.

But the documentation says "These objects contain the original values of 
displayhook and excepthook at the start of the program."  So, other code in 
stdlib may assume something about __displayhook__ value.  I.e. it writes the 
values it gets to sys.stdout.  (Apparently, doctest thinks so.) Such 
assumptions should be documented, before people can override __displayhook__ 
safely.

> What solution do you propose instead of 8048, which fixed a bug?

IMHO, it's not a bug.  Why not override sys.displayhook just for doctests in 
this application?

PS:
Sorry for late answer, somehow I haven't got mail notification after your reply.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26092>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to