[issue24447] tab indentation breaks in tokenize.untokenize

2015-06-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> tokenize/untokenize roundtrip fails with tabs ___ Python tracker _

[issue24447] tab indentation breaks in tokenize.untokenize

2015-06-13 Thread Dingyuan Wang
New submission from Dingyuan Wang: If a script uses tabs for indentation, tokenize.untokenize won't restore original indentation correctly from the second line of the indentation level, and thus breaks the file. This affects all Python versions. Test code: python2 -c 'import sys, tokenize;