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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-0.0.36.tar.gz
Algorithm Hash digest
SHA256 4a7a7d709e4f535269e143618940e83517885686156e483923b9747cc14d6378
MD5 86d90290ba5a028414c15f7eebd4c530
BLAKE2b-256 982d35aa8f54c6952f011c5864f33531ad8b8f7e6f8d76af6797482f4e1f39ce

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