Author Albert-Jan Nijburg
Recipients Albert-Jan Nijburg, meador.inge
Date 2017-05-16.13:08:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za>
In-reply-to
Content
While porting tokenize.py to javascript I stumbled upon this. The bit of code that checks if it's a newline or a comment, checks for comment twice. These can be split up, this way the code is a bit more readable. 

https://github.com/python/cpython/blob/master/Lib/tokenize.py#L560

It's not broken, it's just a bit more complex then it has to be.
History
Date User Action Args
2017-05-16 13:08:09Albert-Jan Nijburgsetrecipients: + Albert-Jan Nijburg, meador.inge
2017-05-16 13:08:09Albert-Jan Nijburgsetmessageid: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za>
2017-05-16 13:08:09Albert-Jan Nijburglinkissue30377 messages
2017-05-16 13:08:08Albert-Jan Nijburgcreate