[issue26632] __all__ decorator
Barry A. Warsaw
report at bugs.python.org
Thu Mar 24 20:24:34 EDT 2016
Barry A. Warsaw added the comment:
On Mar 25, 2016, at 12:14 AM, Ethan Furman wrote:
>public = Public(globals())
>
>@public
>def baz(a, b):
> #blah blah
>
>public('CONST1', 2)
I'm not crazy about that, plus I rather don't like the implicit binding of the
name. I suppose we should just drop the idea of convenience for non-"API".
Just use the defined @public for classes and functions, and an explicit
__all__.append('CONST') for other names.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26632>
_______________________________________
More information about the Python-bugs-list
mailing list