summaryrefslogtreecommitdiffstats
path: root/ExampleSubmission/animals.py
blob: d1c933a9b05c71afcd87ae42e25bcdfd31308b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import datetime

class Animal:
    def __init__(self):
        self.birthday = datetime.datetime.now()

    def move(self):
        return "*moves*"

class Dog(Animal):
    """Some

    multiline

    docs"""
    def speak(self):
        return "woof"

class Cat(Animal):
    def speak(self):
        return "meow"

class Kitten(Cat):
    """nyaa~~~
    """
    def speak(self):
        return "meow (but cuter)"

kitten = Kitten()
with open("animals.txt", "w") as f:
    f.write(kitten.speak())