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 *
@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.4.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for Access_Modify-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db698cccac98b6d7d0430fbc7143a7d79b5f22401dec7df02464ab20cbc78b42 |
|
MD5 | b6ca73e1be7a8b80744bd786cb330da4 |
|
BLAKE2b-256 | ed63bb544da11011c1790e2d712140facee2e8caf4d01aff47d250687879a211 |