472,789 Members | 818 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

Question about python 2.4 documentation

Hello all.

I have a small question concerning the functions open(...) and file(...)
with python 2.4

In the online version of the documentation in the build-in functions
(section 2.1 http://docs.python.org/lib/built-in-funcs.html) here is an
quote of the file(...) doc :
The file() constructor is new in Python 2.2 and is an alias for open().
Both spellings are equivalent.
The intent is for open() to continue to be preferred for use as a factory function which
returns a new file object.
The spelling, file is more suited to type testing (for example, writing "isinstance(f, file)").

In my installed python 2.4 documentation the correspondig quote : The file() constructor is new in Python 2.2.
The previous spelling, open(), is retained for compatibility, and is an alias for file().


If I understand well, in my version it is recommended to use file()
function instead of open(), and in the online version it is the opposite.

what is the favorite function you recommend me to use ?
Thanks for your responses .
Jul 19 '05 #1
1 1434
Fouff wrote:
I have a small question concerning the functions open(...) and file(...)
with python 2.4
The intent is for open() to continue to be preferred for use as a factory
function which returns a new file object.
versus
The previous spelling, open(), is retained for compatibility, and is an
alias for file().

what is the favorite function you recommend me to use ?


The former has BDFL blessing. Let Guido speak:

http://mail.python.org/pipermail/pyt...ly/045921.html

Peter
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jeffrey Borkent | last post by:
Hi There, I have an open source program which i am trying to add to. class classname(member,member) def __init__(self,list) self.__list = list self.refresh = 360
11
by: Steve | last post by:
posted on: comp.lang.python emailed to: docs@python.org I have a suggestion/request that will, I think, improve the Python documentation. Currently, the Python documentation in HTML format is...
25
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30...
65
by: Steven Watanabe | last post by:
I know that the standard idioms for clearing a list are: (1) mylist = (2) del mylist I guess I'm not in the "slicing frame of mind", as someone put it, but can someone explain what the...
26
by: Kevin Walzer | last post by:
....with a twist. I'm undertaking my first semi-substantial Python GUI application after a long time dabbling with the language. I'm fairly experienced with Tcl/Tk, so Tkinter seems the...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.