File: classes.py

package info (click to toggle)
sphinx-automodapi 0.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 944 kB
  • sloc: python: 1,696; makefile: 197
file content (51 lines) | stat: -rw-r--r-- 727 bytes parent folder | download | duplicates (4)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
__all__ = ['Spam', 'Egg']


class BaseSpam(object):
    """
    Base class for Spam
    """

    def eat(self, time):
        """
        Eat some spam in the required time.
        """
        pass

    def buy(self, price):
        """
        Buy some MOAR spam.
        """
        pass


class Spam(BaseSpam):
    """
    The main spam
    """
    pass


class Egg(object):
    """
    An egg (no inheritance)
    """

    def eat(self, time):
        """
        Eat some egg in the required time.
        """
        pass

    def buy(self, price):
        """
        Buy some MOAR egg.
        """
        pass

    @property
    def weight(self):
        """
        The weight of an egg
        """
        return 0