Better ABC
https://stackoverflow.com/questions/23831510/abstract-attribute-not-property
Usage
from better_abc import ABCMeta, abstract_attribute # see below
class AbstractFoo(metaclass=ABCMeta):
@abstract_attribute
def bar(self):
pass
class Foo(AbstractFoo):
def __init__(self):
self.bar = 3
class BadFoo(AbstractFoo):
def __init__(self):
pass
Foo() # ok
BadFoo() # will raise: NotImplementedError: Can't instantiate abstract class BadFoo
# with abstract attributes: bar
If you want other features of ABC they need to be imported from the abc module directly.
from abc import abstractmethod
from better_abc import ABCMeta, abstract_attribute
Metadata
Release files for better-abc 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| better-abc-0.0.3.tar.gz | 2.9 kB | Without provenance | Details for better-abc-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| better_abc-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for better_abc-0.0.3-py3-none-any.whl |
Total release size: 6.3 kB
Release files / better-abc-0.0.3.tar.gz
| Download URL | better-abc-0.0.3.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a880fd6bc9675da2ec991e8712a555bffa0f12722efed78c739f78343cf989f6
|
|
BLAKE2b-256 checksum How to use checksums |
8b723d630f781659015357cc08cad32aa636b252e007df0bae31184a3d872427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
|
Release files / better_abc-0.0.3-py3-none-any.whl
| Download URL | better_abc-0.0.3-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ae73b473fbeb536a548f542984976e80b821676ae6e18f14e24d8e180647187
|
|
BLAKE2b-256 checksum How to use checksums |
d9e87d00a23039ab74c5741736ce05d7700eb6237e83747aac4df07a5bf2d074
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
|
Security for better-abc 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.