mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Document sys.std* typing (#10135)
This commit is contained in:
@@ -57,9 +57,20 @@ if sys.version_info >= (3, 8):
|
||||
pycache_prefix: str | None
|
||||
ps1: object
|
||||
ps2: object
|
||||
|
||||
# TextIO is used instead of more specific types for the standard streams,
|
||||
# since they are often monkeypatched at runtime. At startup, the objects
|
||||
# are initialized to instances of TextIOWrapper.
|
||||
#
|
||||
# To use methods from TextIOWrapper, use an isinstance check to ensure that
|
||||
# the streams have not been overridden:
|
||||
#
|
||||
# if isinstance(sys.stdout, io.TextIOWrapper):
|
||||
# sys.stdout.reconfigure(...)
|
||||
stdin: TextIO
|
||||
stdout: TextIO
|
||||
stderr: TextIO
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
stdlib_module_names: frozenset[str]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user