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 r.david.murray
Recipients r.david.murray, techtonik
Date 2010-04-26.17:22:43
SpamBayes Score 4.440892e-16
Marked as misclassified No
Message-id <1272302566.15.0.356184495822.issue7583@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is that it would be equally reasonable for someone to want to put real tab characters in the output section (which results in strange looking doctest text) or to put expanded spaces in the doctest output section based on the assumption that output starts in the column under the first > of the >>> and that doctest will expand the tabs in the output it receives from the executed test using a tabstop of 8.  Neither of these is a good solution (the first gives you messed up looking doctests, the second means the output you document isn't really the output the test gives).  The second solution would also mean a significant rewrite of the doctest processing loop.  So the best course, since doctests are *primarily* about documentation, is to allow tabs in the output only with whitespace normalization.  (If you really want to test for the presence of tabs in the output, as opposed to just creating documentation, you can capture the output and test it using string comparison.)

Personally I think the 'too bad' language in the docs is not really appropriate, so if you can think of a succinct way to document the above, I'll see about getting it in to the docs.
History
Date User Action Args
2010-04-26 17:22:46r.david.murraysetrecipients: + r.david.murray, techtonik
2010-04-26 17:22:46r.david.murraysetmessageid: <1272302566.15.0.356184495822.issue7583@psf.upfronthosting.co.za>
2010-04-26 17:22:44r.david.murraylinkissue7583 messages
2010-04-26 17:22:43r.david.murraycreate