learn-more-python-the-hard-way-solutions icon indicating copy to clipboard operation
learn-more-python-the-hard-way-solutions copied to clipboard

return missing from queue_wrapped.py wrapped methods

Open blgo opened this issue 8 years ago • 0 comments

Hello Zed,

I think this is a very good example of how to use composition in Python to wrap a class. However, the return functions are missing from "count" and "unshift".

def unshift(self): """Removes the head item and returns it.""" return self.list.unshift()

def count(self): return self.list.count()

https://github.com/zedshaw/learn-more-python-the-hard-way-solutions/blob/dc3adab80bf9020cc714dd2dd763964b5a7d1865/ex15_queuestack/queue_wrapped.py#L10

blgo avatar Sep 20 '17 09:09 blgo