Access Modify
Use private, protected class methods in Python!
Download
pip install access-modify
Example
from access_modify import *
@access
class Test:
# Test.a can be used by Test class methods.
@private
def a(self): return 1
# Test.b can be used by Test class, or inherited class methods.
@protected
def b(self): return self.a()+1
class Inherited(Test):
@public
def c(self): return self.b()+1
r = Test()
w = Inherited()
print(r.a()) # raise AccessException
print(r.b()) # raise AccessException
print(w.c()) # 3
Release files for Access-Modify 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Access-Modify-1.0.8.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Access_Modify-1.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / Access-Modify-1.0.8.tar.gz
| Download URL | Access-Modify-1.0.8.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
408250c814ce8252912c49cc28240c926f69dcde183aa89b2afc465908b9320f
|
|
BLAKE2b-256 checksum How to use checksums |
fca1a134faf66b9492add3fd05666634d740f8557da43debc64b63fbf1d4e0d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
|
Release files / Access_Modify-1.0.8-py3-none-any.whl
| Download URL | Access_Modify-1.0.8-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
206f546350d926591b0b161db321dee0dcb327b71ae3ffefb9b6ca124a09421a
|
|
BLAKE2b-256 checksum How to use checksums |
74bb2d8396f12b46db422ea477e7eee4125aeafa030e5a71d6b49451e2343f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
|