mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
uio: Document getvalue.
This commit is contained in:
+15
-1
@@ -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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user