On Jul 23, 2019, at 08:44, Steve Dower <steve.do...@python.org> wrote:
> The @public decorator is basically: > > def public(fn): > __all__.append(fn.__name__) > return fn > > It's trivial, but it adds a runtime overhead that is also trivially avoided > by putting the name in __all__ manually. And once it's public API, we > shouldn't be making it too easy to rename the function anyway ;) My package has a C version. If public() were a builtin (which I’ve implemented) it wouldn’t have that much import time overhead. -Barry
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/CVL6TBW7J7U4YU756DI4JUFGFDXLQS6B/