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 serhiy.storchaka
Recipients effbot, ezio.melotti, gvanrossum, mrabarnett, pitrou, rhettinger, serhiy.storchaka, terry.reedy
Date 2014-11-09.18:45:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <8184788.6OkEFgrSc3@raxxla>
In-reply-to <1415501546.92.0.728532376224.issue22434@psf.upfronthosting.co.za>
Content
Thank you Raymond for the review.

> I especially like the removal of superfluous OPCODES dictionary lookups

The disadvantage is that now backporting patches to old branches is harder.

> Since the op codes are singletons, you can use identity tests instead of
> equality checks in sre_parse.py:

This is deliberate. There is small change that the opcodes could became an 
integers in future (after adding introspection to pattern object, or make it 
copyable, or allowing serialization of compiled codes). "is" instead of "==" 
can cause subtle bug. Note that "is" is used during parsing, but getwidth() is 
called from sre_compile.py.
History
Date User Action Args
2014-11-09 18:45:04serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, effbot, rhettinger, terry.reedy, pitrou, ezio.melotti, mrabarnett
2014-11-09 18:45:04serhiy.storchakalinkissue22434 messages
2014-11-09 18:45:04serhiy.storchakacreate