On Jul 23, 2019, at 08:44, Steve Dower <[email protected]> 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 -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/CVL6TBW7J7U4YU756DI4JUFGFDXLQS6B/
