Re: Oddity with lambda and yield

2015-01-08 Thread Chris Angelico
On Fri, Jan 9, 2015 at 1:30 AM, Ian Kelly wrote: > > Seems like a bug to me. http://bugs.python.org/issue23192 created with a bit more info, including disassembly. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Oddity with lambda and yield

2015-01-08 Thread Ian Kelly
On Thu, Jan 8, 2015 at 5:11 AM, Chris Angelico wrote: > As yield is an expression, it's legal in a lambda function, which then > means you have a generator function. But it's not quite the same as > the equivalent function made with def: > > $ python3 > Python 3.5.0a0 (default:1c51f1650c42+, Dec 2

Oddity with lambda and yield

2015-01-08 Thread Chris Angelico
As yield is an expression, it's legal in a lambda function, which then means you have a generator function. But it's not quite the same as the equivalent function made with def: $ python3 Python 3.5.0a0 (default:1c51f1650c42+, Dec 29 2014, 02:29:06) [GCC 4.7.2] on linux Type "help", "copyright", "