[issue33762] Make tempfiles subclass IOBase

Terry J. Reedy report at bugs.python.org
Wed Dec 11 15:46:17 EST 2019


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Looking at the tempfile code more, I agree with Serhiy that changing it should be rejected.  Python is a duck-typed language (essentially what Martin said). People should not be over-zealous in using instance checks.
 
The doc specifically says that TemporaryFile returns a *file-like object*
https://docs.python.org/3/glossary.html#term-file-like-object
which only require implementing the interface.

----------
resolution:  -> rejected
stage: test needed -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33762>
_______________________________________


More information about the Python-bugs-list mailing list