"Simon Forman" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| class FakeQueue(list):
|    put = list.append
|    get = lambda self: self.pop(0)

Sorry, to me this is a foolish use of lambda as it is exactly the same as

  def get(self): self.pop(0)

except that in the latter, the resulting function object gets a proper 
internal name instead of '<lambda>', therefore giving a more informative 
traceback in case of an exception.

tjr



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to