@public decorator, public(*objects) function - add objects names to __all__
Project description
Install
[sudo] pip install public
Usage
# @public decorator
>>> from public import public
>>> @public
def func(): pass
>>> print(__all__)
['func']
>>> @public
>>> class CLS: pass
>>> print(__all__)
['CLS',func']
# public(*objects) function
>>> from public import public
>>> public("name")
>>> print(__all__)
['name']
>>> public("name1","name2")
>>> print(__all__)
['name','name1','name2']
Sources:
russianidiot.github.io/python/ - Python packages
russianidiot.github.io/cli/ - command line scripts
README.rst - generated with readmemako.py (python+ mako templates) and .README dotfiles
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-0.0.28.tar.gz
(8.1 kB
view details)
File details
Details for the file public-0.0.28.tar.gz
.
File metadata
- Download URL: public-0.0.28.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06964895f3cab56be9e8f0626f6d95aa59baeb922c4b1ff94b09b9ad25d68159 |
|
MD5 | 7087bd5d46c4133080ba6c642d573de3 |
|
BLAKE2b-256 | 847ff6abbeeb1fca7bc52d29ebeb823bbb605ece30ee9de7b377956ca70bccfa |