Testing a package that can be inherit to classes that use it
Project description
qafunnypet
Install qafunnypet from PyPi.
pip install qafunnypet
Example
from qafunnypet import Qafunnypet
class Dog(Qafunnypet):
def __init__(self, name, age, color=None):
super().__init__(name, age)
self.color = color
def present(self):
if self.color is None:
pass
else:
print(f"I am {self.name} and I am {self.age} years old and I am {self.color}")
def speak(self):
print("Bark")
>>> doggy = Dog("Tim", 15, "Bronw")
>>> doggy.present()
>>> doggy.speak()
>>> some = Qafunnypet("Cuasi", 10)
>>> some.present()
>>> some.speak()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qafunnypet-0.1.0.tar.gz
(1.7 kB
view hashes)