STINNER Victor added the comment: Patch version 3:
* pattern_hash() includes isbytes, I also shifted flags by 1 bit to not erase the isbytes bit (FYI maximum value of flags is 256) * pattern_richcompare() avoids calling PyObject_RichCompareBool() if flags or isbytes is different * unit test ensures that no BytesWarning warning is raised * checks hash() in unit tests * fix also the unit test with a different flag (use the same pattern) * document also in the unit test that the comparison is case sensitive ---------- Added file: http://bugs.python.org/file45528/pattern_compare-3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28727> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com