learn-more-python-the-hard-way-solutions
learn-more-python-the-hard-way-solutions copied to clipboard
return missing from queue_wrapped.py wrapped methods
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