473,738 Members | 8,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1459
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
1535
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
1983
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 stored at URLs that change with each new release of Python. That is, for example, the documentation for the os module is at http://python.org/doc/2.3/lib/module-os.html for release 2.3 of Python,
25
7751
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 minutes with Python 3 times a week since, have 14 years of computing experience, 8 years in mathematical computing and 4 years in unix admin and perl, i have quickly found the official doc: http://python.org/doc/2.4.1/lib/module-gzip.html
65
4228
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 difference is between these and: (3) mylist =
26
1913
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 obvious choice to reduce my Python learning curve. However, my Tcl applications typically make use of a *lot* of extensions to the core widget set, such as BWidgets, tablelist, and Tile.
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9263
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.