[py-dev] Why: "RuntimeError: maximum recursion depth exceeded"
Jesus Cea
jcea at argo.es
Sat Mar 10 17:53:17 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm a new but happy "greenlets" user since a couple of hours ago :-),
but I have found a problem with stack limit. Since greenlet's "switch()"
stores the stack aside, I don't understand the problem.
I've tried Google, without success.
The code:
"""
>>> from py.magic import greenlet
>>> def a() :
... i=gr.pop()
... i.switch()
...
>>> gr=[greenlet.getcurrent()]
>>> gr+=[greenlet(a) for i in xrange(100)]
>>> greenlet(a).switch()
()
>>> gr=[greenlet.getcurrent()]
>>> gr+=[greenlet(a) for i in xrange(1000)]
>>> greenlet(a).switch()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: maximum recursion depth exceeded
"""
I don't understand why I'm getting this error. I'm sure I'm missing
something...
Thanks in advance.
- --
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea at argo.es http://www.argo.es/~jcea/ _/_/ _/_/ _/_/ _/_/ _/_/
jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/
_/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBRfLifZlgi5GaxT1NAQLUVgQAiISmf1ZaGrZ+cH6XsQgxlZJywnDhyM8/
JmxtdXVv2i2nTGSVe4pZFFnlrHyEQNCTsbcM4icTjQxyVMbJqkVGC54qXDo8DTWA
3qV5QV2iktaJSNCxNxAKAzv0E4nP2nNdBPNZ1QdzS78WPAsTLtDE82elQ2EuMsBz
rCaJQJL6vaM=
=dKlM
-----END PGP SIGNATURE-----
More information about the Pytest-dev
mailing list