mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
give the C implementation of TextIOWrapper the errors property #6217
This commit is contained in:
parent
3bbbf18a38
commit
0926ad1f05
7 changed files with 50 additions and 26 deletions
11
Lib/_pyio.py
11
Lib/_pyio.py
|
|
@ -1286,6 +1286,13 @@ class TextIOBase(IOBase):
|
|||
"""
|
||||
return None
|
||||
|
||||
@property
|
||||
def errors(self):
|
||||
"""Error setting of the decoder or encoder.
|
||||
|
||||
Subclasses should override."""
|
||||
return None
|
||||
|
||||
io.TextIOBase.register(TextIOBase)
|
||||
|
||||
|
||||
|
|
@ -1932,6 +1939,10 @@ class StringIO(TextIOWrapper):
|
|||
# that's a implementation detail.
|
||||
return object.__repr__(self)
|
||||
|
||||
@property
|
||||
def errors(self):
|
||||
return None
|
||||
|
||||
@property
|
||||
def encoding(self):
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue