S
Simon Forman
class FakeQueue(list):
put = list.append
get = lambda self: self.pop(0)
;]
put = list.append
get = lambda self: self.pop(0)
;]
Simon Forman said:class FakeQueue(list):
put = list.append
get = lambda self: self.pop(0)
| 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)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.