replace '__all__' with '@public.add' decorator
Project description
Installation
$ [sudo] pip install public
Features
- replace
__all__
with@public.add
decorator
before
__all__ = ["func"]
def func():
after
import public
@public.add
def func():
Functions
function | __doc__ |
---|---|
public.add(*objects) |
add objects to __all__ |
public.public(*objects) |
add objects to __all__ . deprecated |
public.test(module) |
test module __all__ |
Examples
>>> import public
>>> @public.add
def func(): pass
>>> @public.add
class Cls: pass
>>> __all__
['Cls','func']
>>> public.add("name")
>>> public.add(*["name1","name2"])
>>> __all__
['Cls','func','name','name1','name2']
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-2019.3.22.tar.gz
(2.2 kB
view hashes)
Built Distribution
public-2019.3.22-py2.py3-none-any.whl
(135.5 kB
view hashes)
Close
Hashes for public-2019.3.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f62a1f5a4511b96413c01d473f0663282ab17041da4d0815b4937ad9f24e8ec |
|
MD5 | 57db2d1e7dbd1284aa2b0eb9e8592739 |
|
BLAKE2b-256 | 2ea4b59e107878d2a251fd586dcc4f4af457b08116fb1625c90a76416a294cb2 |