From 06ec17c5e65d03ffd14a60ce89fe71234eb81c8a Mon Sep 17 00:00:00 2001 From: jwansek Date: Mon, 17 Jan 2022 19:47:01 +0000 Subject: added getting class inheritance tree, getting method args nicely, fixed bug with importing too many modules --- ExampleSubmission/animals.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ExampleSubmission/animals.py (limited to 'ExampleSubmission/animals.py') diff --git a/ExampleSubmission/animals.py b/ExampleSubmission/animals.py new file mode 100644 index 0000000..10c1cb4 --- /dev/null +++ b/ExampleSubmission/animals.py @@ -0,0 +1,22 @@ +import datetime + +class Animal: + def __init__(self): + self.birthday = datetime.datetime.now() + + def move(self): + return "*moves*" + +class Dog(Animal): + def speak(self): + return "woof" + +class Cat(Animal): + def speak(self): + return "meow" + +class Kitten(Cat): + """nyaa~~~ + """ + def speak(self): + return "meow (but cuter)" -- cgit v1.2.3