Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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!
from typing import Union
class Food: ...
class Meat(Food): ...
class Chocolate(Food): ...
class Dog:
def eat(self, food: Meat):
pass
@pawelswiecki
pawelswiecki / julia_introduction.ipynb
Last active August 4, 2022 16:36
The Quickest Introduction to Julia (for Pythonistas)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.