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 Oren Milman
Recipients Oren Milman
Date 2016-01-10.18:59:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452452400.02.0.853203557937.issue26076@psf.upfronthosting.co.za>
In-reply-to
Content
In Parser\tokenizer.c, in tok_get, in the identification of a potential NUMBER token, in case the token starts with a '0', the next char of the token is retrieved, followed by two redundant checks:
if (c == '.')
    goto fraction;
if (c == 'j' || c == 'J')
    goto imaginary;

These two are redundant, because they check for the case of a token starting with '0.' or '0j', but even without them, the flow in either of these would reach the code after the /* maybe old-style octal; c is first char of it */ comment.
This code (after consuming all zeros and all decimal digits) would again perform those exact two checks, and handle them exactly the same.

My proposal is simply to remove the first two checks.

I have attached the patched tokenizer.c (the redundant checks are just commented out).
History
Date User Action Args
2016-01-10 19:00:02Oren Milmansetrecipients: + Oren Milman
2016-01-10 19:00:00Oren Milmansetmessageid: <1452452400.02.0.853203557937.issue26076@psf.upfronthosting.co.za>
2016-01-10 18:59:59Oren Milmanlinkissue26076 messages
2016-01-10 18:59:59Oren Milmancreate