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 takluyver
Recipients brett.cannon, bskinn, takluyver, xtreak
Date 2019-04-24.07:27:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556090864.62.0.98443452731.issue36695@roundup.psfhosted.org>
In-reply-to
Content
I'm still a bit confused why it gets escaped - as far as I know, the escaping only happens when you repr() a string, as the displayhook does automatically:

>>> a = """ a ' single and " double quote """
>>> a
' a \' single and " double quote '
>>> print(repr(a))
' a \' single and " double quote '
>>> print("%r" % a)
' a \' single and " double quote '
>>> print(a)
 a ' single and " double quote

The warnings code doesn't appear to ever repr() the message. So I guess it's some further bit of interaction with doctest. But unfortunately I don't have time to dig through doctest to try and understand it.
History
Date User Action Args
2019-04-24 07:27:44takluyversetrecipients: + takluyver, brett.cannon, bskinn, xtreak
2019-04-24 07:27:44takluyversetmessageid: <1556090864.62.0.98443452731.issue36695@roundup.psfhosted.org>
2019-04-24 07:27:44takluyverlinkissue36695 messages
2019-04-24 07:27:44takluyvercreate