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

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

[Python-Dev] file() or open()?Aahz aahz at pythoncraft.com
Mon Jul 12 15:44:44 CEST 2004
On Sat, Jul 10, 2004, Terry Reedy wrote:
>
> In a previous post, Guido justified 'open' on the basis that
> applications 'open' 'files'.  However, in every such application I
> can think of at the moment, 'open' means 'read the data and convert
> it to one of the application's internal native formats, even if it
> was written in a different format by another application.  In other
> words, app.open(path) == file(path).read().convert(filetype(path)).
> Conversely, one never opens a file before saveing a fresh new
> document; one just saves-as.  So Python's open() is quite different
> from the app usage of 'open'.

On the gripping hand, just about every programming language in the Algol
family uses ``open()``.  And yes, I'm specifically including C/C++ and
Perl.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Typing is cheap.  Thinking is expensive."  --Roy Smith, c.l.py
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