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.1.tar.gz
(1.7 kB
view details)
File details
Details for the file qafunnypet-0.1.1.tar.gz
.
File metadata
- Download URL: qafunnypet-0.1.1.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51cecd5d373f3f40c967e7b347ea5b022821e3136c176919ddf4debf243e2da9 |
|
MD5 | 7975d01b9d12e770318ae45c26f021a9 |
|
BLAKE2b-256 | 4d884be5870805a5c01bb6934acd12abd4e25e26c4ffca6dc00268fef7e0fb69 |