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-0.0.1.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for Access_Modify-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a759a3002b63b1119f5285d098da5102b3d074e3b68709957b6209b6f9802c8 |
|
MD5 | 15d5e6449495426dd34202bacb9803d6 |
|
BLAKE2b-256 | cc6d4899094bda377819df8bd80b54043e14bb1731950e3efac8564e4293fb20 |