# sclass
Simple module that allows you to create classes with the concept of Private and Public attributes and methods.
Just create your own class inheriting from sclass. Private methods are recognized by the first character of the attribute being ‘_’
` from sclass import sclass
- class Test(sclass):
- def __init__(self):
self.name = “lorenzo” self._surname = “bartolini”
- def publicmethod(self):
return ‘Public’
- def _privatemethod(self):
return ‘private’
x = Test()
print(x.name) print(x.publicmethod()) print(x._surname) print(x._privatemethod()) `
Last two instructions will raise a custom exception: PrivateException
Release files for sclass 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sclass-1.0.0.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sclass-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / sclass-1.0.0.tar.gz
| Download URL | sclass-1.0.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c60c6bca70bc22e6e5d75c8e09ddfc1e5782379a4336dd1117c1547d606c65e
|
|
BLAKE2b-256 checksum How to use checksums |
515a9c4b0c8948a2eed650465602e5b2d21e2751d08c8a5a1fe26e1070484dc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.4
|
Release files / sclass-1.0.0-py3-none-any.whl
| Download URL | sclass-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47d7047dbef9d8497fd28996522a7e688e669e852742476187363f04d7ab0f98
|
|
BLAKE2b-256 checksum How to use checksums |
b9ba4bd27b7ed115dccbb9c7b18c3fabf6c213a687d8de23f83e4b8e7cbcacdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.4
|