Message328884
I am surprised, that removing the newline character adds a token:
>>> pprint.pprint(list(tokenize.generate_tokens(io.StringIO('#\n').readline)))
[TokenInfo(type=55 (COMMENT), string='#', start=(1, 0), end=(1, 1), line='#\n'),
TokenInfo(type=56 (NL), string='\n', start=(1, 1), end=(1, 2), line='#\n'),
TokenInfo(type=0 (ENDMARKER), string='', start=(2, 0), end=(2, 0), line='')]
>>> pprint.pprint(list(tokenize.generate_tokens(io.StringIO('#').readline)))
[TokenInfo(type=55 (COMMENT), string='#', start=(1, 0), end=(1, 1), line='#'),
TokenInfo(type=56 (NL), string='', start=(1, 1), end=(1, 1), line='#'),
TokenInfo(type=4 (NEWLINE), string='', start=(1, 1), end=(1, 2), line=''),
TokenInfo(type=0 (ENDMARKER), string='', start=(2, 0), end=(2, 0), line='')] |
|
Date |
User |
Action |
Args |
2018-10-30 06:45:57 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, gregory.p.smith, taleinat, meador.inge, ammar2, pablogsal |
2018-10-30 06:45:57 | serhiy.storchaka | set | messageid: <1540881957.75.0.788709270274.issue35107@psf.upfronthosting.co.za> |
2018-10-30 06:45:57 | serhiy.storchaka | link | issue35107 messages |
2018-10-30 06:45:57 | serhiy.storchaka | create | |
|