This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sergey.Kirpichev
Recipients Sergey.Kirpichev, georg.brandl, r.david.murray
Date 2016-05-13.12:04:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463141044.17.0.296311935682.issue26092@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2016-05-13 12:04:04Sergey.Kirpichevsetrecipients: + Sergey.Kirpichev, georg.brandl, r.david.murray
2016-05-13 12:04:04Sergey.Kirpichevsetmessageid: <1463141044.17.0.296311935682.issue26092@psf.upfronthosting.co.za>
2016-05-13 12:04:04Sergey.Kirpichevlinkissue26092 messages
2016-05-13 12:04:03Sergey.Kirpichevcreate