replace '__all__' with '@public.add' decorator
Project description
Installation
$ [sudo] pip install public
Features
- replace
__all__with@public.adddecorator
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.4.13.tar.gz
(2.3 kB
view details)
File details
Details for the file public-2019.4.13.tar.gz.
File metadata
- Download URL: public-2019.4.13.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1436a8a99693a9849dfe40b9158f3837b7c309c163b2d3f5b8e9fce23876db1
|
|
| MD5 |
d770152da4f7817e479ac920c805b280
|
|
| BLAKE2b-256 |
544db40004cc6c07665e48af22cfe1e631f219bf4282e15fa76a5b6364f6885c
|