Is this a bug in the windows tempfile.py?

"Martin v. Löwis" martin at v.loewis.de
Wed Sep 15 01:20:01 EDT 2004


Jonathan Wright wrote:
> Should the wrapper inherit types.FileType?

No. Code assuming that the result from tempfile.TemporaryFile
is a file object is broken - you are only guaranteed a
file-like object. Applications should not use isinstance to
determine whether something is a file-like object.

Regards,
Martin



More information about the Python-list mailing list