Python module which includes private, or protected class methods for your classes.
Project description
Access Modify
Use private, protected class methods in Python!
Example
from access-modify import *
# Process decorators
@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.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for Access_Modify-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc4fabcc1aef4a9eb4b450e73954ec622a209064be52a65c0eb79a9a6a4f56e |
|
MD5 | a2d5e8ad406cb24ddc2f2d4172823350 |
|
BLAKE2b-256 | 02a494e63a7fb6fd3f1e3399567b40bc35a82f2996ac3e694ed69b1b44f0d67a |