Yup, although it's a change in behavior that would need to be studied
carefully for backwards incompatibilities. Usually it's given as a
constant, so there won't be any problems; but there might be code that
receives a mode string and attempts to test its validity by trying it
and catching IOError, such code would have to be changed.

--Guido

On 6/12/06, Kristján V. Jónsson <[EMAIL PROTECTED]> wrote:
> I notice that file() throws an IOError when it detects an invalid mode
> string.  Wouldn't a ValueError be more appropriate?

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to