Skip to main content

replace __all__ with @public.add decorator

Project description

Installation

$ [sudo] pip install public

Features

  • replace __all__ with @public.add decorator

before

__all__ = ["func"]

def func():

after

import public

@public.add
def func():

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

readme42.com

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

Uploaded Source

File details

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

File metadata

  • Download URL: public-2020.12.3.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for public-2020.12.3.tar.gz
Algorithm Hash digest
SHA256 2919ef9037e2a2d2563f8431adaa09b6b129d5398d0a687e42f00593484a9aa2
MD5 428f1f477f2ec75c2160ff7d9a017fb5
BLAKE2b-256 260ae1ea97f50e248c83acf80c2ab3b41bce8bb674348a6a3af7b7e40bb6aadd

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