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年03月17日 00:48 by py.user, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg156112 - (view) | Author: py.user (py.user) * | Date: 2012年03月17日 00:48 | |
http://docs.python.org/py3k/library/re.html#avoiding-recursion >>> import sys >>> sys.getrecursionlimit() 1000 >>> import re >>> s = 'Begin ' + 1000*'a very long string ' + 'end' >>> re.match('Begin (\w| )*? end', s).end() 19009 >>> |
|||
| msg156126 - (view) | Author: Matthew Barnett (mrabarnett) * (Python triager) | Date: 2012年03月17日 02:41 | |
As far as I can tell, back in 2003, changes were made to replace the recursive scheme which used stack allocation with a non-recursive scheme which used heap allocation in order to the improve the behaviour.
To me it looks like an oversight and that the example should have been removed at the time, but unfortunately was retained and just updated in subsequent releases to refer to the Python version ("python3.2" in this case).
|
|||
| msg156169 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年03月17日 16:26 | |
New changeset 8172d7dce0ed by Georg Brandl in branch '3.2': Closes #14342: remove out-of-date section about avoiding recursion errors. http://hg.python.org/cpython/rev/8172d7dce0ed |
|||
| msg156171 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年03月17日 16:27 | |
New changeset 276f79e4b215 by Georg Brandl in branch '2.7': Closes #14342: remove out-of-date section about avoiding recursion errors. http://hg.python.org/cpython/rev/276f79e4b215 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:28 | admin | set | github: 58550 |
| 2012年03月17日 16:27:47 | python-dev | set | messages: + msg156171 |
| 2012年03月17日 16:26:40 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg156169 resolution: fixed stage: resolved |
| 2012年03月17日 02:41:19 | mrabarnett | set | messages: + msg156126 |
| 2012年03月17日 00:48:27 | py.user | create | |