We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3d7d2aa + 680ab0f commit a8a471cCopy full SHA for a8a471c
importlib_resources/trees.py
@@ -59,6 +59,16 @@ def __truediv__(self, child):
59
Return Traversable child in self
60
"""
61
62
+ @abc.abstractmethod
63
+ def open(self, mode='r', *args, **kwargs):
64
+ """
65
+ mode may be 'r' or 'rb' to open as text or binary. Return a handle
66
+ suitable for reading (same as pathlib.Path.open).
67
+
68
+ When opening as text, accepts encoding parameters such as those
69
+ accepted by io.TextIOWrapper.
70
71
72
73
def from_package(package):
74
"""Return a Traversable object for the given package"""
0 commit comments