Author tim.peters
Recipients CuriousLearner, jairotrad, r.david.murray, tim.peters
Date 2018-11-21.22:16:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542838598.48.0.788709270274.issue24746@psf.upfronthosting.co.za>
In-reply-to
Content
To include trailing whitespace on a line in a doctest, _don't_ use raw strings.  Use a regular string, and include add a (one or more) trailing \x20 instead of a space (for example).  For example:

r"""
>>> print("a ")
a 
"""

where there's a space at the end of the output line is no good.  It's visually impossible to tell what's intended, and the commit hook should reject it.  But this works fine (a regular string and an escape code):

"""
>>> print("a ")
a\x20
"""
History
Date User Action Args
2018-11-21 22:16:39tim.peterssetrecipients: + tim.peters, r.david.murray, jairotrad, CuriousLearner
2018-11-21 22:16:38tim.peterssetmessageid: <1542838598.48.0.788709270274.issue24746@psf.upfronthosting.co.za>
2018-11-21 22:16:38tim.peterslinkissue24746 messages
2018-11-21 22:16:38tim.peterscreate