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 py.user
Recipients docs@python, ezio.melotti, mrabarnett, py.user
Date 2014-07-14.07:23:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/3/library/re.html#writing-a-tokenizer

There are redundant escapes in the regex:

('OP',      r'[+*\/\-]'),    # Arithmetic operators

Sequence -+*/ is sufficient.

It makes the loop to do all steps on every 4 spaces:

('SKIP',    r'[ \t]'),       # Skip over spaces and tabs

Sequence [ \t]+ is faster.


Applied patch.
History
Date User Action Args
2014-07-14 07:23:21py.usersetrecipients: + py.user, ezio.melotti, mrabarnett, docs@python
2014-07-14 07:23:21py.usersetmessageid: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za>
2014-07-14 07:23:21py.userlinkissue21977 messages
2014-07-14 07:23:21py.usercreate