Python ABC with a simple @abstract_property decorated checked after instantiation
Project description
Better Abstract Basic Classes
Python ABC with a simple @abstract_property decorated checked after instantiation
Entirely based on this StackOverflow answer by krassowski.
Example:
from better_abc import BetterABC,abstract_property
class AbstractClassWithAbstractAttribute(BetterABC):
@abstract_property
def prop(self):
pass
otherprop = abstract_property()
class ClassWithProperty(AbstractClassWithAbstractAttribute)
def __init__(self,propvalue=12):
self.prop = 12
self.otherprop = "a string"
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file abc_property-1.0-py3-none-any.whl
.
File metadata
- Download URL: abc_property-1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a421c39a141e2f29e5399c7b288d6159f73c1e3a7b5179ffe05489d5f267ebc4 |
|
MD5 | e5b44a78ffe51e7fc989b999a77b3185 |
|
BLAKE2b-256 | 875447f73dc9f18a17a584c5db4b2a8bda22ec0bb35bdef263dfad7096014c8a |