[issue10544] yield expression inside generator expression does nothing

2013-01-14 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___ ___ Python-bugs-list

[issue10544] yield expression inside generator expression does nothing

2013-01-12 Thread Daniel Shahaf
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net: -- nosy: +danielsh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___ ___

[issue10544] yield expression inside generator expression does nothing

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___

[issue10544] yield expression inside generator expression does nothing

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___ ___

[issue10544] yield expression inside generator expression does nothing

2013-01-11 Thread Ed Campbell
Changes by Ed Campbell drescampb...@gmail.com: -- nosy: +esc24 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___ ___ Python-bugs-list

[issue10544] yield expression inside generator expression does nothing

2010-12-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: #3267 did not expose endless loop possibility and was closed as won't fix. Rather than reopen that and close this and move nosy list back, I added to nosy list here. -- nosy: +brett.cannon, erickt, terry.reedy

[issue10544] yield expression inside generator expression does nothing

2010-12-08 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: FWIW, the endless loop possibility is not of issue here, and is simply an artifact of the specific generator function the OP uses. -- ___ Python tracker rep...@bugs.python.org

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: While the behavior is confusing, I don't think yield inside comprehensions should be disallowed. Rather, the fact that comprehensions have their own scope should be stated clearer. -- nosy: +georg.brandl

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I think I can probably fix it, but it's debatable whether it should be done, since it'd make list comps more of quasi functions. -- nosy: +benjamin.peterson ___ Python tracker

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This discussion should probably be moved to python-dev. With tools like Twisted's inlineDefer or the Monocle package, there is a growing need to be able to use yield in complex expressions. Yet, that goes against the trend

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: I think it is definitely wrong the way it works in 3.x. (Especially since it works as expected in 2.x.) I agree with Inyeol's preference of fixes: (1) make it work properly for listcomps as well as genexps, (2) if that's not possible,

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: PS. Wasn't there a similar issue with something inside a genexp that raises StopIteration? Did we ever solve that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Changes by Guido van Rossum gu...@python.org: -- assignee: gvanrossum - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___ ___

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___ ___

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Isn't this the same issue as #3267? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: Yes it is, but I was never asked about it back then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___

[issue10544] yield expression inside generator expression does nothing

2010-11-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Hmm, what an interesting and unexpected side-effect of the efforts to hide the loop induction variable. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org

[issue10544] yield expression inside generator expression does nothing

2010-11-26 Thread Inyeol Lee
no way to either stop the execution inside nested function (since it's not started yet!) or send() a value to its yield expression. Still I think this behavior is a bug and needs fixed. - best fix would make it behave the same as for loop. - if it's not fixable, yield expression inside genexp should

[issue4748] yield expression vs lambda

2008-12-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I didn't find it, but someone from the German Python webforum. :) Hmm, I wonder why lambda: (yield 1) alone doesn't give [1, None]. (That should also go into the test case.) Anyway, perhaps yield in lambdas should be forbidden.

[issue4748] yield expression vs lambda

2008-12-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: On Sat, Dec 27, 2008 at 11:41 AM, Georg Brandl rep...@bugs.python.org wrote: Georg Brandl ge...@python.org added the comment: I didn't find it, but someone from the German Python webforum. :) Hmm, I wonder why lambda: (yield 1) alone

[issue4748] yield expression vs lambda

2008-12-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Hmm, I wonder why lambda: (yield 1) alone doesn't give [1, None]. (That should also go into the test case.) Actually, I don't think the return value should even make it's way to the list. Generator lambdas shouldn't have any return value IMO.

[issue4748] yield expression vs lambda

2008-12-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r67954. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4748 ___

[issue4748] yield expression vs lambda

2008-12-26 Thread Georg Brandl
1 (2) 7 YIELD_VALUE 8 BUILD_TUPLE 2 11 RETURN_VALUE -- messages: 78291 nosy: georg.brandl priority: high severity: normal status: open title: yield expression vs lambda versions: Python 2.6, Python 3.0

[issue4748] yield expression vs lambda

2008-12-26 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Attaching patch? BTW, how did you find this bug? :) -- keywords: +needs review, patch nosy: +benjamin.peterson stage: - patch review type: - behavior Added file: http://bugs.python.org/file12467/nasty_lambda_generators.patch

yield expression programmized-formal interpretation. (interpretation of yield expression.)

2008-04-21 Thread castironpi
What if I say oath= yield or other= yield ? Does yield evaluate without parenthes? (Eth.) -- http://mail.python.org/mailman/listinfo/python-list

Re: yield expression programmized-formal interpretation. (interpretation of yield expression.)

2008-04-21 Thread Gabriel Genellina
En Mon, 21 Apr 2008 15:03:05 -0300, [EMAIL PROTECTED] escribió: What if I say oath= yield or other= yield ? Does yield evaluate without parenthes? (Eth.) You can't use yield except in a generator function. From http://docs.python.org/ref/yieldexpr.html and the grammar definition

<    1   2