Created
September 9, 2014 00:22
-
-
Save bsmithgall/5e0dfccbb99501f3a4de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PaperTowel: | |
def __init__(self, input='paper towel'): | |
if isinstance(input, str): | |
self.output = sum([ord(i) for i in input]) | |
elif isinstance(input, int): | |
self.output = input | |
else: | |
raise Exception("that's not right!") | |
print type(PaperTowel().output) | |
# <type `int`> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment