replace '__all__' with '@public.add' decorator
Project description
Install
$ [sudo] pip install public
Features
- replace
__all__
with@public.add
decorator
before
__all__ = ["func"]
def func():
after
import public
@public.add
def func():
Examples
>>> import public
>>> @public.add
def func(): pass
>>> @public.add
class Cls: pass
>>> print(__all__)
['Cls','func']
>>> public.add("name")
>>> public.add(*["name1","name2"])
>>> print(__all__)
['name','name1','name2']
test module __all__
>>> import module
>>> public.test(module)
Links
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
public-2.0.1.tar.gz
(1.9 kB
view details)
Built Distribution
File details
Details for the file public-2.0.1.tar.gz
.
File metadata
- Download URL: public-2.0.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6730025da60548f2fc36c12d06a53f26055e0f28bb0634174e2f4dfaf52bfb |
|
MD5 | 9e138a5df205b6b9e68166c0740cf2b8 |
|
BLAKE2b-256 | 1633c04773cc83e8e190f3335b85d62d1755ad6fe0c9162376dbd684734f746a |
File details
Details for the file public-2.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: public-2.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0d7125221de71e1a9c82297bf6f82c246141883b9d63cbe58d49ef4666a48bd |
|
MD5 | f6efb0e8c9b2337551b6b8466e29da5a |
|
BLAKE2b-256 | 0e451a8ab7780a60b8dbfd030b3b8d8515f80f4ff5c6a1b39f4fcb956575f421 |