[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

STINNER Victor report at bugs.python.org
Fri Nov 18 06:13:45 EST 2016


STINNER Victor added the comment:

> '[abc]' and '[cba]' are compiled to the same code. Do we want to handle them as equal?

Comparison must be fast. If the comparison is just memcmp(code1,
code2, codesize), it's ok.

I agree that we must put a similar somewhere to say that some parts
are implementation details. Maybe split the test in two parts, and
mark the second part with @cpython_only.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28727>
_______________________________________


More information about the Python-bugs-list mailing list