Skip to main content

@public decorator, public(*objects) function - add objects names to __all__

Project description

Install

[sudo] pip install public

Usage

>>> from public import public

>>> @public # decorator

>>> public(*objects) # function

Example

>>> @public
        def func(): pass

>>> @public
        class CLS: pass

>>> print(__all__)
['CLS',func']

# public(*objects) function
>>> public("name")
>>> public("name1","name2")

>>> print(__all__)
['name','name1','name2']

Examples/

Feedback github_issues gitter github_follow

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.37.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file public-0.0.37.tar.gz.

File metadata

  • Download URL: public-0.0.37.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for public-0.0.37.tar.gz
Algorithm Hash digest
SHA256 fcfed54fc39da263248668d2b36099bbf384f1b4fb2281a58b1e4e1016786554
MD5 c4e04a381471a0929da6a0c7242b55a1
BLAKE2b-256 557eb4de5be2bfadaa342a9cc05ea7065be17f802aaf045960db082df95b95b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page