io: StringIO seems happy enough to take None (#3973)

Didn't check C code, but the _pyio implementation explicitly checks for
None

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-05-12 18:33:48 -07:00
committed by GitHub
parent 111f3f02ef
commit e0f9242e76

View File

@@ -203,7 +203,7 @@ class TextIOWrapper(TextIO):
def tell(self) -> int: ...
class StringIO(TextIOWrapper):
def __init__(self, initial_value: str = ...,
def __init__(self, initial_value: Optional[str] = ...,
newline: Optional[str] = ...) -> None: ...
# StringIO does not contain a "name" field. This workaround is necessary
# to allow StringIO sub-classes to add this field, as it is defined