[issue7583] doctest should normalize tabs when comparing output

2010-04-05 Thread anatoly techtonik
anatoly techtonik added the comment: Could you be more specific about why users should not be allowed to use tabs in docstrings. An example use case/user story would help me a lot. I've made a precondition to check tab existence before expanding tabs for performance reasons. The indentation

[issue7583] doctest should normalize tabs when comparing output

2010-04-04 Thread R. David Murray
R. David Murray added the comment: Having thought about it some more, I see why you did the patch the way you did. The fact that there are two completely different ways to expand tabs in the output that are equally valid and have their advantages and disadvantages makes me wonder if this shou

[issue7583] doctest should normalize tabs when comparing output

2010-04-03 Thread R. David Murray
R. David Murray added the comment: I think I can see how it would cause confusion, and in general it shouldn't be necessary to use real tabs in a doctest. So as you say the output should be fixed to match. However, I don't think the patch is quite correct. It looks to me like the expandtab

[issue7583] doctest should normalize tabs when comparing output

2010-04-01 Thread anatoly techtonik
anatoly techtonik added the comment: http://docs.python.org/library/doctest.html#how-are-docstring-examples-recognized "Changed in version 2.4: Expanding tabs to spaces is new; previous versions tried to preserve hard tabs, with confusing results" Unfortunately, no confusing results survived

[issue7583] doctest should normalize tabs when comparing output

2010-04-01 Thread R. David Murray
R. David Murray added the comment: Removed [patch] from title as patch is set on the keywords. Removed 2.5 from versions because it is in security fix only mode (we use versions for where things will be fixed, not where they are broken). Changed component to Library as this is not a bug in

[issue7583] doctest should normalize tabs when comparing output

2010-03-31 Thread anatoly techtonik
Changes by anatoly techtonik : -- keywords: +patch Added file: http://bugs.python.org/file16712/issue7583.doctest.tabs.diff ___ Python tracker ___

[issue7583] doctest should normalize tabs when comparing output

2009-12-27 Thread anatoly techtonik
New submission from anatoly techtonik : Since 2.4 doctest converts all tabs to 8-space sequences in test source. It should do the same with output it receives for comparison. Right now there is no way to write a correct doctest if the output includes tab character. See attached doctabtest.py