An auxiliary stream accumulating into a list reference.
| 1099 | return stream.getvalue() |
| 1100 | |
| 1101 | class _ListDataStream(io.BufferedIOBase): |
| 1102 | """An auxiliary stream accumulating into a list reference.""" |
| 1103 | def __init__(self, lst): |
| 1104 | self.lst = lst |
| 1105 | |
| 1106 | def writable(self): |
| 1107 | return True |
| 1108 | |
| 1109 | def seekable(self): |
| 1110 | return True |
| 1111 | |
| 1112 | def write(self, b): |
| 1113 | self.lst.append(b) |
| 1114 | |
| 1115 | def tell(self): |
| 1116 | return len(self.lst) |
| 1117 | |
| 1118 | def tostringlist(element, encoding=None, method=None, *, |
| 1119 | xml_declaration=None, default_namespace=None, |
no outgoing calls
no test coverage detected
searching dependent graphs…