Skip to content

Instantly share code, notes, and snippets.

@Gastove
Created October 16, 2018 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gastove/35b7d38c605db321c798f719be23c170 to your computer and use it in GitHub Desktop.
Save Gastove/35b7d38c605db321c798f719be23c170 to your computer and use it in GitHub Desktop.
Classes!
class CustOps:
def __init__(self, name, age, hire_date):
self.name = name
self.age = age
self.hire_date = convert_to_dt(hire_date)
def tenure(self):
# today - hire date
pass
def convert_to_dt(self, the_date_str):
pass
class Specialist(CustOps):
def __init__(
self,
name,
age,
hire_date,
is_admin
):
self.is_admin = is_admin
super().__init__(name, age, hire_date)
def de_escalate(self):
pass
class Advisor(CustOps):
pass
class SeniorAdvisor(Advisor):
pass
class Manager(CustOps):
pass
class Experts(Specialist):
pass
class ApiSearch:
api_root_url = ''
def auth(self):
pass
def parse_results(self):
pass
def do_the_search(self):
pass
class SearchResults:
pass
class SwearWord:
def __init__(self, bob):
self.this_word = bob
def swear(self):
print(self.this_word + '!')
class Profanity(SwearWord):
def __init__(self, the_word):
upper_case_swear = the_word.upper()
self.big_profane = upper_case_swear
super().__init__(the_word)
def yell(self):
print(self.big_profane + '!')
class Obscenity(SwearWord):
def swear(self):
print('Holy ' + self.this_word)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment