MCPcopy Index your code
hub / github.com/python/cpython / _io_wrapper

Function _io_wrapper

Lib/importlib/resources/_adapters.py:32–37  ·  view source on GitHub ↗
(file, mode='r', *args, **kwargs)

Source from the content-addressed store, hash-verified

30
31
32def _io_wrapper(file, mode='r', *args, **kwargs):
33 if mode == 'r':
34 return TextIOWrapper(file, *args, **kwargs)
35 elif mode == 'rb':
36 return file
37 raise ValueError(f"Invalid mode value '{mode}', only 'r' and 'rb' are supported")
38
39
40class CompatibilityFiles:

Callers 2

openMethod · 0.85
openMethod · 0.85

Calls 1

TextIOWrapperClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…