On Tue, May 05, 2009, David wrote:
>Dear list,
>
>in different books I come across different syntax for dealing with
>files. It seems that open(filename, 'r') and file(filename, 'r') are
>used interchangeably, and I wonder what this is all about. Is there a
>reason why Python allows such ambiguity here?
>
>Cheers for a quick shot of enlightenment ;-)

``pydoc file'' is your friend.  It says open is an alias for file.

Bill
-- 
INTERNET:   b...@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

A petty thief is put in jail. A great brigand becomes ruler of a
State. -- Chuang Tzu
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to