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():
Functions
function | description |
---|---|
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
readme-md - README.md generator
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-2018.11.20.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for public-2018.11.20-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2250d4aca6719b66090402400de22777a37b0d2e9ac3ff74dc3f348725090fa |
|
MD5 | 2916669250202dfce2f63107d7e77855 |
|
BLAKE2b-256 | 36c86dbeeeeb5ae9d897873df6bcdf4141cf8f160fa1e75a8a62d53535ddd19f |