Message223000
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. |
|
Date |
User |
Action |
Args |
2014-07-14 07:23:21 | py.user | set | recipients:
+ py.user, ezio.melotti, mrabarnett, docs@python |
2014-07-14 07:23:21 | py.user | set | messageid: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za> |
2014-07-14 07:23:21 | py.user | link | issue21977 messages |
2014-07-14 07:23:21 | py.user | create | |
|