uio: Document getvalue.

This commit is contained in:
Laurens Valk
2022-11-29 20:28:08 +01:00
parent 71ce165a46
commit f5d9a4f1c6
+15 -1
View File
@@ -14,7 +14,7 @@ This module contains ``stream`` objects that behave like files.
from typing import overload, Union
# TODO: MicroPython streams implement '__enter__', '__exit__', 'close', 'read',
# 'readinto', 'readline', 'write', 'flush', 'getvalue', 'seek', 'tell'
# 'readinto', 'readline', 'write', 'flush', 'seek', 'tell'
# and are iterable
@@ -45,6 +45,13 @@ class BytesIO:
alloc_size (int): Optional number of preallocated bytes.
"""
def getvalue(self) -> bytes:
"""
getvalue() -> bytes
Gets the contents of the underlying buffer.
"""
class StringIO:
@overload
@@ -72,6 +79,13 @@ class StringIO:
alloc_size (int): Optional number of preallocated bytes.
"""
def getvalue(self) -> str:
"""
getvalue() -> str
Gets the contents of the underlying buffer.
"""
class FileIO:
"""