Python module which includes private, or protected class methods for your classes.
Project description
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
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 Distribution
Access-Modify-1.0.8.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file Access-Modify-1.0.8.tar.gz
.
File metadata
- Download URL: Access-Modify-1.0.8.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 408250c814ce8252912c49cc28240c926f69dcde183aa89b2afc465908b9320f |
|
MD5 | 395c5e76d0734b42655d4949a3dd428b |
|
BLAKE2b-256 | fca1a134faf66b9492add3fd05666634d740f8557da43debc64b63fbf1d4e0d5 |
File details
Details for the file Access_Modify-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: Access_Modify-1.0.8-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 206f546350d926591b0b161db321dee0dcb327b71ae3ffefb9b6ca124a09421a |
|
MD5 | e2bbe2d31e0591384a6c767585c964f2 |
|
BLAKE2b-256 | 74bb2d8396f12b46db422ea477e7eee4125aeafa030e5a71d6b49451e2343f54 |