Hello all,
I’m having a hard time understanding this line in multiprocessing…
__all__ = [x for x in dir(context._default_context) if not x.startswith('_')]
At the point the line appears, context
is a module object, but it doesn’t have an attribute _default_context
. It does contain the class DefaultContext
who’s __init__
method sets self._default_context
, but that’s not an attribute of the module that contains the class?
multiprocessing/__init__.py doesn’t overwrite the name context
by storing a context.DefaultContext
object in it either, so I can’t quite work out what it’s referencing.
Any thoughts?