A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-September/048955.html below:

[Python-Dev] tempfile.TemporaryFile on Windows NT

[Python-Dev] tempfile.TemporaryFile on Windows NTTim Peters tim.peters at gmail.com
Thu Sep 16 04:34:58 CEST 2004
[Martin v. Löwis]
> Ah, ok. This is probably the time to present my case: Somebody
> complained on c.l.p that isinstance(tempfile.TemporaryFile(), file)
> gives True on Linux but False on Windows. While this result is
> "in principle correct", I think something can be done to make it
> correct practically, too.

I'm not going to object, but writing "isinstance(..., file)" is almost
never a *practical* thing to do in Python code anyway, so I don't
personally see the attraction.  Since tons of file-like objects aren't
instances of __builtin__.file, and it doesn't make a lick of
difference that they aren't, "isinstance(..., file)" isn't in the
practical Pythoneer's vocabulary.  That doesn't mean you can't want
this change for inscrutable reasons, though <wink>.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4