On 5/4/2009 2:50 PM bob gailer said...
PDavid 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?
Backwards compatibility. The file type was introduced in python 2.2,
before which there was open.
Emile
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor