From bad94148be868bfe8e6403410089cb0624652ca9 Mon Sep 17 00:00:00 2001 From: kjg Date: Fri, 12 Jun 2020 23:10:56 +0900 Subject: [PATCH] [Python #9] update e42.py --- kjg/python-the-hard-way/e42.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kjg/python-the-hard-way/e42.py b/kjg/python-the-hard-way/e42.py index bf71bbd..0690618 100644 --- a/kjg/python-the-hard-way/e42.py +++ b/kjg/python-the-hard-way/e42.py @@ -1,6 +1,7 @@ ## Animal is-a object (yes, sort of confusing) look at the extra credit class Animal(object): - pass + def something(self): + print("base") ## Dog is-a Animal @@ -37,7 +38,8 @@ class Employee(Person): ## Fish is-a object class Fish(object): - pass + def __init__(self): + print("Base Fish") ## Salmon is-a Fish @@ -52,7 +54,7 @@ class Halibut(Fish): ## rover is-a Dog rover = Dog("Rover") - +rover.something() ## satan is-a Cat satan = Cat("Satan")