I’m looking over the code for Python’s multiprocessing
module, and it contains this line:
JavaScript
x
2
1
from ._multiprocessing import win32, Connection, PipeConnection
2
instead of
JavaScript
1
2
1
from _multiprocessing import win32, Connection, PipeConnection
2
the subtle difference being the period before _multiprocessing
. What does that mean? Why the period?
Advertisement
Answer
That’s the syntax for explicit relative imports. It means import from the current package.