On 29 Sep., 03:55, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "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)
Better use def get(self): return self.pop(0) otherwise you will *get* nothing ;) BTW I wonder why a destructive operation is named *get* instead of *take* ? -- http://mail.python.org/mailman/listinfo/python-list