Last active
October 20, 2019 08:12
-
-
Save inesp/a085ff7ca1f52e7a015fefa05ce83827 to your computer and use it in GitHub Desktop.
This file contains 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 PizzaMaker: | |
def create_pizza(self, **pizza_properties): | |
pizza_type = pizza_properties["ptype"] | |
pizza_class = get_pizza_class(pizza_type) | |
if pizza_class is None: | |
raise UnknownPizaType(pizza_type) | |
del pizza_properties["ptype"] | |
pizza = pizza_class(**pizza_properties) | |
return pizza |
This file contains 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 PizzaMargherita(DBModel): | |
id = column.Int.... | |
created_at = column.DateTime.... | |
created_by = column.fk... | |
cheeze_type = column.Enum... | |
with_bazil = column.Bool... | |
.... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment