News for hackers. Stuff that matters.
Re:Silly Python riddle by cool-RR on Tuesday December 20, 2011 @10:45AM (#3373786)
Sure, I understand all of that. I'm just saying it's unusual to see a lambda function throwing away the value like that.
Re:Silly Python riddle by martin_k on Tuesday December 20, 2011 @10:59AM (#3373838)
The value of the lambda is the generator object. How else could you call list() on it if it was thrown away?
Re:Silly Python riddle by cool-RR on Tuesday December 20, 2011 @11:38AM (#3374035)
You're just using the word "value" in a different way. I meant "value" as in the 7.
Re:Silly Python riddle by martin_k on Tuesday December 20, 2011 @11:48AM (#3374084)
You're right. I am still referring to that particular part of your blog post:

  >> So that’s the only case I can think of where Python
  >> completely throws away the value of a lambda function.