[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-16 Thread Stefan Behnel
Stefan Behnel added the comment: Very good argumentation, thanks Nick! I think this is worth being fixed in the 3.1 series. -- ___ Python tracker ___ ___

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-16 Thread Stefan Behnel
Changes by Stefan Behnel : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-14 Thread Nick Coghlan
Nick Coghlan added the comment: Reopening - this should be rejected by the compiler as a SyntaxError, since it is the comprehension equivalent of writing "return Value" inside a generator function. Specifically, in 3.x, the equivalent written out code is: while True: def _listcomp(

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Not a bug. The list comprehension in your chunker: while True: target.send([ (yield) for i in range(chunk_size) ]) is equivalent to the following generator in Python 3: while True: def g(): for i in range(chunk_size)

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-09 Thread Georg Brandl
Georg Brandl added the comment: No idea, actually. I just wanted to point out that it is nothing specific to Python 3. -- ___ Python tracker ___ _

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-09 Thread Stefan Behnel
Stefan Behnel added the comment: Hmm, ok, so this is actually an anticipated bug? And I assume this has been discussed before and was decided to get solved by doing... what? Is it documented somewhere why this happens and what one must avoid to not run into this kind of pitfall? -- __

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-09 Thread Georg Brandl
Georg Brandl added the comment: Try list(genexp) instead of [listcomp] in 2.x and see what happens... -- nosy: +georg.brandl ___ Python tracker ___ __

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-09 Thread Stefan Behnel
New submission from Stefan Behnel : Here's a simple coroutine that works perfectly in Python 2.6 but seems to let Py3.1 enter an infinite loop that ends up eating all memory. - def printing_sink(): "A simple sink that prints the received values." while True: print