Raymond Hettinger added the comment: I reviewed re_named_consts.patch and it looks great (I especially like the removal of superfluous OPCODES dictionary lookups and improved repr for the integer codes).
Since the op codes are singletons, you can use identity tests instead of equality checks in sre_parse.py: - if op == "in": + if op == IN: Also, I'll echo the suggestion to make NamedIntConstant private with a leading underscore. Nice work. ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22434> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com