-
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathlion.py
More file actions
20 lines (15 loc) · 501 Bytes
/
lion.py
File metadata and controls
20 lines (15 loc) · 501 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"A Lion Class"
import random
from interface_proteus import IProteus
import leopard
import serpent
class Lion(IProteus): # pylint: disable=too-few-public-methods
"Proteus in the form of a Lion"
name = "Lion"
def tell_me_the_future(self):
"Proteus will change to something random"
self.__class__ = leopard.Leopard if random.randint(
0, 1) else serpent.Serpent
@classmethod
def tell_me_your_form(cls):
print("I am the form of a " + cls.name)