Skip to content

Instantly share code, notes, and snippets.

@ychennay
Last active March 18, 2020 04:13
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 ychennay/7a4eee7b1c5f93e55ba5012b520ee91b to your computer and use it in GitHub Desktop.
Save ychennay/7a4eee7b1c5f93e55ba5012b520ee91b to your computer and use it in GitHub Desktop.
Student and Model class
class Model(metaclass=ModelBase):
def __init__(self):
print(f"Inside __init__ of Model with: {self}")
super(Model, self).__init__() # object's __init__
class Student(Model):
def __init__(self):
print(f"Inside __init__ of Student with: {self}")
super().__init__() # Model's __init__
age = 16 # attribute ... we'll see how this gets transformed
class ModelField:
def __init__(self, value):
self.value = f"[{str(value)}]"
def compute_some_complex_relationship(self):
pass
def save_value_to_persistent_store(self):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment