Skip to main content

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

This version

1.0

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

abc_property-1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

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

Hashes for abc_property-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a421c39a141e2f29e5399c7b288d6159f73c1e3a7b5179ffe05489d5f267ebc4
MD5 e5b44a78ffe51e7fc989b999a77b3185
BLAKE2b-256 875447f73dc9f18a17a584c5db4b2a8bda22ec0bb35bdef263dfad7096014c8a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page