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.
Created on 2012年09月23日 16:14 by lingster, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| re.py | lingster, 2012年09月23日 16:14 | amend regex. | ||
| Messages (6) | |||
|---|---|---|---|
| msg171051 - (view) | Author: Ling Li (lingster) | Date: 2012年09月23日 16:14 | |
Hi, I would like to make a small improvement to the exception raised when _compile() function fails with exception on line 245. Please see attached amended file. The line of code is amended from: raise error, v # invalid expression to: raise error, r'%s with pattern: %s' % (v, pattern) # invalid expression As this is my first contribution, please let me know if this is the correct procedure to submit changes. Kind regards, Ling |
|||
| msg171054 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2012年09月23日 16:21 | |
Please provide a patch in unified diff format. |
|||
| msg171055 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2012年09月23日 16:23 | |
> As this is my first contribution, please let me know if this is the correct procedure to submit changes. This is the correct procedure. http://docs.python.org/devguide/ (the Python Devlopment Guide) is a guide on how to contribute to Python. Hope you enjoy your Python development experience! |
|||
| msg171702 - (view) | Author: Wael Al Jishi (Wael.Al.Jishi) | Date: 2012年10月01日 10:54 | |
The attached file is very different to the current source, including the docstring. Is this from python 2.x? |
|||
| msg227072 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年09月18日 21:32 | |
The original try/except that leads to the raise does not exist in the latest 3.5 code. I'd be inclined to close this as "out of date" for compatibility reasons if nothing else. |
|||
| msg278754 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月16日 09:02 | |
Since 3.5 (issue22578) the re.error exception has attributes that contain a pattern and the position of the error. Error message contains the position of the error. A pattern is not included in the error message for purpose: it can be too long. Usually the pattern is clear from the context, and you always can check the pattern attribute. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:36 | admin | set | github: 60211 |
| 2016年10月16日 09:02:54 | serhiy.storchaka | set | status: open -> closed superseder: Add additional attributes to re.error messages: + msg278754 resolution: out of date stage: needs patch -> resolved |
| 2014年11月01日 22:14:14 | ezio.melotti | set | nosy:
+ serhiy.storchaka |
| 2014年09月18日 21:32:15 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg227072 |
| 2012年10月01日 10:54:46 | Wael.Al.Jishi | set | nosy:
+ Wael.Al.Jishi messages: + msg171702 |
| 2012年09月30日 16:56:46 | ezio.melotti | set | stage: needs patch |
| 2012年09月23日 16:23:34 | Ramchandra Apte | set | nosy:
+ Ramchandra Apte messages: + msg171055 |
| 2012年09月23日 16:21:59 | benjamin.peterson | set | nosy:
+ benjamin.peterson messages: + msg171054 versions: + Python 3.4, - Python 2.7 |
| 2012年09月23日 16:14:27 | lingster | create | |