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 <1479469519.28.0.373929240811.issue28727@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
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: <1479469519.28.0.373929240811.issue28727@psf.upfronthosting.co.za>
2016-11-18 11:45:19serhiy.storchakalinkissue28727 messages
2016-11-18 11:45:18serhiy.storchakacreate