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

Method write

Lib/_android_support.py:121–133  ·  view source on GitHub ↗
(self, b)

Source from the content-addressed store, hash-verified

119 return True
120
121 def write(self, b):
122 if type(b) is not bytes:
123 try:
124 b = bytes(memoryview(b))
125 except TypeError:
126 raise TypeError(
127 f"write() argument must be bytes-like, not {type(b).__name__}"
128 ) from None
129
130 # Writing an empty string to the stream should have no effect.
131 if b:
132 logcat.write(self.prio, self.tag, b)
133 return len(b)
134
135 # This is needed by the test suite --timeout option, which uses faulthandler.
136 def fileno(self):

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected