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 terry.reedy
Recipients BreamoreBoy, ezio.melotti, mrabarnett, pitrou, serhiy.storchaka, steven.daprano, terry.reedy
Date 2014-09-19.23:03:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411167818.42.0.316435976643.issue22364@psf.upfronthosting.co.za>
In-reply-to
Content
Steven and Mark are correct that a tracker patch cannot change a 3rd party module.  On the other hand, we are free to improve error messages in new versions.  And we are free to borrow ideas from 3rd part modules. I changed the title accordingly. 

(Back compatibility comes into play in not making message enhancements in bugfix releases even though message details are not part of the documented API. People who write code that depends on those details, and doctexts need not so depend, should expect to revise for new versions.  I expect that some of our re tests would need to be changed.)

Re and regex are a bit special in that regex is the only re replacement (that I  know of) and is (almost) a drop-in replacement.  So some people *are*, on their own, replacing re with regex by installing regex (easy with pip) and adding 'import regex as re' at the top of their code.

Serhiy suggested either picking the best or writing a new one, I think a new one combining both would be best in many of the cases.  As a user, I like "name missing terminal '>'" for #2 (is there an adjective for a name in this context?) and for #4, "group name missing terminal '>'".  (Note that we usually quote literals, as in #8.)  For #12, I would like a parallel construction "set expression missing terminal ']'" if that is possible.  But the currently vague re message "unexpected end of regular expression" might be raised as a point where the specific information is lost and only the general version is correct.

As for #14, either UNICODE and LOCALE *are* compatible (for re) or this is buggy.
>>> import re
>>> re.compile(r'\w', re.UNICODE | re.LOCALE)
re.compile('\\w', re.LOCALE|re.UNICODE)
History
Date User Action Args
2014-09-19 23:03:38terry.reedysetrecipients: + terry.reedy, pitrou, ezio.melotti, mrabarnett, steven.daprano, BreamoreBoy, serhiy.storchaka
2014-09-19 23:03:38terry.reedysetmessageid: <1411167818.42.0.316435976643.issue22364@psf.upfronthosting.co.za>
2014-09-19 23:03:38terry.reedylinkissue22364 messages
2014-09-19 23:03:37terry.reedycreate