View typing2_18.py
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
from typing import Union | |
class Food: ... | |
class Meat(Food): ... | |
class Chocolate(Food): ... | |
class Dog: | |
def eat(self, food: Meat): | |
pass |
View typing2_14c.py
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 Railroad: | |
pass | |
def feed_animal(animal: BaseAnimal): | |
piece_of_railroad = Railroad() | |
animal.eat(piece_of_railroad) | |
lassie = Dog() | |
feed_animal(lassie) # It's safe, Lassie won't touch it anyway! |
View julia_introduction.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View haskell_fun.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.