(no title)
moreati | 7 months ago
from ._core import (
Loop as Loop,
sleep as sleep,
...
)
Does using `<name> as <name>` change the runtime behaviour at all? Or is it a stylistic choice?moreati | 7 months ago
from ._core import (
Loop as Loop,
sleep as sleep,
...
)
Does using `<name> as <name>` change the runtime behaviour at all? Or is it a stylistic choice?
patrickkidger|7 months ago
C.f. "the intention here is that only names imported using the form X as X will be exported" from PEP484. [1]
I'm generally a fan of the style of putting all the implementation in private modules (whose names start with an underscore) and then using __init__.py files solely to declare the public API.
[1] https://peps.python.org/pep-0484/
tayo42|7 months ago