Ron Adam wrote:
I wonder if "yield from" may run into pythons stack limit?
My current implementation wouldn't, because nested yield-froms
don't result in nested activations of Python frames. But...
if __name__ == "__main__":
print(factoral(10000)) # <---- extra zero too!
But if I add another zero, it begins to slow to a crawl as it uses swap
space. ;-)
How would a "yield from" version compare?
... there is still a Python frame in existence for each
active invocation of the generator, so it would probably
use about the same amount of memory.
--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com