final_class
Final classes for python3.6+.
Features
- No metaclass conflicts
- No runtime overhead
- No dependencies
- Type hints included
- Designed to be as simple as possible
Why?
In languages like java we have a nice way
to restrict subclassing any class by making it final:
public final class SomeClass {
// ...
}
In python we don't have such feature out of the box.
That's where final_class library comes in!
Installation
pip install final_class
Usage
from final_class import final
@final
class Example(object): # You won't be able to subclass it!
...
class Error(Example): # Raises `TypeError`
...
License
MIT.
Release files for final-class 0.1.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 | |
|---|---|---|---|
| final-class-0.1.3.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| final_class-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:7.3 kB
Release files / final-class-0.1.3.tar.gz
| Download URL | final-class-0.1.3.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42ec7fd076902022364c975feeb285c7e3a3821e632c04f6c7116040409ef8e4
|
|
BLAKE2b-256 checksum How to use checksums |
865e415aac0681d1fbe7b933f70e2f8aa8f5dfe9d0f5467f99008e799f5bafd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.7.3 Darwin/18.6.0
|
Release files / final_class-0.1.3-py3-none-any.whl
| Download URL | final_class-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d4712c477f1316454608938f38d8e60724c8c70aa60627bec748987d6c1ff1c
|
|
BLAKE2b-256 checksum How to use checksums |
df44eca224f4df296e564ca365a087cc0688b2ed54694df64602795377ba261c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.7.3 Darwin/18.6.0
|