Skip to content

Instantly share code, notes, and snippets.

@bsmithgall
Created September 9, 2014 00:22
Show Gist options
  • Save bsmithgall/5e0dfccbb99501f3a4de to your computer and use it in GitHub Desktop.
Save bsmithgall/5e0dfccbb99501f3a4de to your computer and use it in GitHub Desktop.
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