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 hashes)
Built Distribution
Close
Hashes for public-2.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0d7125221de71e1a9c82297bf6f82c246141883b9d63cbe58d49ef4666a48bd |
|
MD5 | f6efb0e8c9b2337551b6b8466e29da5a |
|
BLAKE2b-256 | 0e451a8ab7780a60b8dbfd030b3b8d8515f80f4ff5c6a1b39f4fcb956575f421 |