initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
@@ -0,0 +1,39 @@
#!/usr/bin/env python
class AnimalBase(): # <1>
def __init__(self, name):
self._name = name
def get_id(self):
print(self._name)
class CanBark(): # <2>
def bark(self):
print("woof-woof")
class CanFly(): # <2>
def fly(self):
print("I'm flying")
class Dog(CanBark, AnimalBase): # <3>
pass
class Sparrow(CanFly, AnimalBase): # <3>
pass
d = Dog('Dennis')
d.get_id() # <4>
d.bark() # <5>
print()
s = Sparrow('Steve')
s.get_id()
s.fly() # <6>
print()
print("Sparrow mro:", Sparrow.mro())