Author ammar2
Recipients ammar2, gregory.p.smith, meador.inge, pablogsal, taleinat, terry.reedy
Date 2018-10-29.23:21:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540855278.84.0.788709270274.issue35107@psf.upfronthosting.co.za>
In-reply-to
Content
fwiw I think there's more at play here than the newline change. This is the behavior I get on 3.6.5 (before the newline change is applied). # works as expected but check out this input:

>>> t.untokenize(tokenize.generate_tokens(io.StringIO('#').readline))
'#'
>>> t.untokenize(tokenize.generate_tokens(io.StringIO('x=1').readline))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python365\lib\tokenize.py", line 272, in untokenize
    self.add_whitespace(start)
  File "D:\Python365\lib\tokenize.py", line 234, in add_whitespace
    .format(row, col, self.prev_row, self.prev_col))
ValueError: start (1,0) precedes previous end (2,0)
History
Date User Action Args
2018-10-29 23:21:18ammar2setrecipients: + ammar2, terry.reedy, gregory.p.smith, taleinat, meador.inge, pablogsal
2018-10-29 23:21:18ammar2setmessageid: <1540855278.84.0.788709270274.issue35107@psf.upfronthosting.co.za>
2018-10-29 23:21:18ammar2linkissue35107 messages
2018-10-29 23:21:18ammar2create