[Python-Dev] Simple CPython stack overflow. (original) (raw)
David Wilson dw at botanicus.net
Mon Feb 20 20:58:08 CET 2006
- Previous message: [Python-Dev] Proposal: defaultdict
- Next message: [Python-Dev] Simple CPython stack overflow.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Just noticed this and wondered if it came under the Python should never crash mantra. Should sys.getrecursionlimit() perhaps be taken into account somewhere?
>>> D = {'a': None}
>>> for i in xrange(150000):
... D = {'a': D}
...
>>> D
{'a': {'a': {'a': {'a': {'a': {'a': {'a': {'a': {'a': {'a': {'a':
{'a': {'a': {'a': {'a': {'a': {'a': {'a': .... ': {'a': {'a': {'a':
{'a': {'a': {'a': {'a': {[+]'a': {'a': {'a': {'a': {'a': {'a': {'a':
{'a': {'a' .... Bus error
bash$
Cheers,
David.
-- 'tis better to be silent and be thought a fool, than to speak and remove all doubt. -- Lincoln
- Previous message: [Python-Dev] Proposal: defaultdict
- Next message: [Python-Dev] Simple CPython stack overflow.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]