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-July/045925.html below:

[Python-Dev] file() or open()?

[Python-Dev] file() or open()? [Python-Dev] file() or open()?Nick Bastin nbastin at opnet.com
Wed Jul 7 04:55:24 CEST 2004
On Jul 6, 2004, at 7:09 PM, Guido van Rossum wrote:

> I'm not sure I agree with this.  While open() and file() are currently
> aliases for the same object, this may not always be the case (it
> certainly wasn't always the case :-).  In the future, I could see
> open() become a factory function again that could return an instance
> of a different class depending on the mode argument, the default
> encoding for files, or who knows what; but file will always remain a
> class.

I agree - I could see a future where open() would support any valid 
URI, for example, while that wouldn't likely be true for file() 
(although file() could reasonably support a local subset).

--
Nick

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