Skip to content

Instantly share code, notes, and snippets.

@singlerider
Created October 13, 2021 15:39
Show Gist options
  • Save singlerider/4f4467bf6e8b632f7b359f62dfc802ff to your computer and use it in GitHub Desktop.
Save singlerider/4f4467bf6e8b632f7b359f62dfc802ff to your computer and use it in GitHub Desktop.
It's undeniable.
class BackAtOne(object):
@classmethod
def step_1(cls):
return "You're like a dream come true"
@classmethod
def step_2(cls):
return "Just want to be with you"
@classmethod
def step_3(cls):
return "Girl, it's plain to see that you're the only one for me"
@classmethod
def step_4(cls):
cls.step_1()
cls.step_2()
cls.step_3()
return "Repeat steps 1 through 3"
@classmethod
def step_5(cls):
return "Make you fall in love with me"
@classmethod
def if_ever_i_believe_my_work_is_done(cls, start_back_at):
print(f"If ever I believe my work is done, I start back at {start_back_at}\n")
cls.execute_steps(start_back_at=start_back_at)
@classmethod
def execute_steps(cls, start_back_at=1):
for i in range(start_back_at, 6):
print(f"{i}: " + getattr(cls, f"step_{i}")())
cls.if_ever_i_believe_my_work_is_done(start_back_at)
try:
BackAtOne.execute_steps(start_back_at=1)
except RecursionError:
print("And I start back at 1...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment