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 SilentGhost, ezio.melotti, mrabarnett, serhiy.storchaka, vstinner
Date 2016-11-18.11:45:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I see two options:

* Compare flags, isbytes and code. This makes some different patterns be compiled to equal objects. For example spaces in verbose mode are ignored. But this don't make equal all equivalent patterns. '[aA]' would be equal to '(?:a|A)' but still would be not equal to '(i?a)' with current implementation.

* Compare flags, isbytes, code and pattern. This makes literally different patterns be compiled to not equal objects even if the difference is not significant. '[abc]' would be different from '[cba]' despites the fact that matching both always returns the same result.

Since this issue becomes a little ambiguous, I would target the patch to 3.7 only. Maybe we will find other subtle details or will decide to change the meaning of equality of pattern objects before releasing 3.7.
Date User Action Args
2016-11-18 11:45:19serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ezio.melotti, mrabarnett, SilentGhost
2016-11-18 11:45:19serhiy.storchakasetmessageid: <>
2016-11-18 11:45:19serhiy.storchakalinkissue28727 messages
2016-11-18 11:45:18serhiy.storchakacreate