mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
merge 3.4 (#23093)
This commit is contained in:
commit
98beb7599e
5 changed files with 61 additions and 42 deletions
|
@ -812,7 +812,7 @@ class _BufferedIOMixin(BufferedIOBase):
|
|||
clsname = self.__class__.__qualname__
|
||||
try:
|
||||
name = self.name
|
||||
except AttributeError:
|
||||
except Exception:
|
||||
return "<{}.{}>".format(modname, clsname)
|
||||
else:
|
||||
return "<{}.{} name={!r}>".format(modname, clsname, name)
|
||||
|
@ -1640,13 +1640,13 @@ class TextIOWrapper(TextIOBase):
|
|||
self.__class__.__qualname__)
|
||||
try:
|
||||
name = self.name
|
||||
except AttributeError:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
result += " name={0!r}".format(name)
|
||||
try:
|
||||
mode = self.mode
|
||||
except AttributeError:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
result += " mode={0!r}".format(mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue