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 serhiy.storchaka
Recipients Isaac Elliott, serhiy.storchaka
Date 2018-06-04.04:31:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1528086687.81.0.592728768989.issue33766@psf.upfronthosting.co.za>
In-reply-to
Content
NEWLINE is not a newline. It is the NEWLINE token. And it is generated at the end of file.

$ echo 'print("a");print("b")' | ./python -m tokenize
1,0-1,5:            NAME           'print'        
1,5-1,6:            OP             '('            
1,6-1,9:            STRING         '"a"'          
1,9-1,10:           OP             ')'            
1,10-1,11:          OP             ';'            
1,11-1,16:          NAME           'print'        
1,16-1,17:          OP             '('            
1,17-1,20:          STRING         '"b"'          
1,20-1,21:          OP             ')'            
1,21-1,22:          NEWLINE        '\n'           
2,0-2,0:            ENDMARKER      ''
History
Date User Action Args
2018-06-04 04:31:27serhiy.storchakasetrecipients: + serhiy.storchaka, Isaac Elliott
2018-06-04 04:31:27serhiy.storchakasetmessageid: <1528086687.81.0.592728768989.issue33766@psf.upfronthosting.co.za>
2018-06-04 04:31:27serhiy.storchakalinkissue33766 messages
2018-06-04 04:31:27serhiy.storchakacreate