parameters: (self, name)
docstring: Acquire `__getattr__` and `__dir__`, but only replace module for versions less than Python 3.7.
docstring_summary: Acquire `__getattr__` and `__dir__`, but only replace module for versions less than Python 3.7.
docstring_tokens: Acquire __getattr__ and __dir__ but only replace module for versions less than Python 3 . 7 .
function: def __init__(self, name):
          """Acquire `__getattr__` and `__dir__`, but only replace module for versions less than Python 3.7."""
  
          self._module = sys.modules[name]
          self._get_attr = getattr(self._module, '__getattr__', None)
          self._get_dir = getattr(self._module, '__dir__', None)
          sys.modules[name] = self
function_tokens: def __init__ ( self , name ) : self . _module = sys . modules [ name ] self . _get_attr = getattr ( self . _module , '__getattr__' , None ) self . _get_dir = getattr ( self . _module , '__dir__' , None ) sys . modules [ name ] = self