| 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | class Towel(object): |
| 4 | """A towel, that one should never be without.""" |
| 5 | |
| 6 | def __init__(self, color='tie-dye'): |
| 7 | self.color = color |
| 8 | self.wrapped_obj = None |
| 9 | |
| 10 | def wrap(self, obj): |
| 11 | """Wrap an object up in our towel.""" |
| 12 | self.wrapped_obj = obj |
| 13 | |
| 14 | def unwrap(self): |
| 15 | """Unwrap whatever is in our towel and return whatever it is.""" |
| 16 | obj = self.wrapped_obj |
| 17 | self.wrapped_obj = None |
| 18 | return obj |