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,32 @@
#!/usr/bin/env python
#
from abc import ABCMeta, abstractmethod
class Animal(metaclass=ABCMeta): # <1>
@abstractmethod # <2>
def speak(self):
pass
class Dog(Animal): # <3>
def speak(self): # <4>
print("woof! woof!")
class Cat(Animal): # <3>
def speak(self): # <4>
print("Meow meow meow")
class Duck(Animal): # <3>
pass # <5>
d = Dog()
d.speak()
c = Cat()
c.speak()
try:
d = Duck() # <6>
d.speak()
except TypeError as err:
print(err)