Using ConfigParse

A. Lloyd Flanagan alloydflanagan at comcast.net
Tue Jun 8 22:54:38 CEST 2004


Peter Otten <__peter__ at web.de> wrote in message news:<ca4dct$1t2$06$1 at news.t-online.com>...

> I looked it up in the source: the read() method expects a filename or a
> sequence of filenames. Incidentally that means, that every line in your
> config-file is interpreted as a filename. It doesn't matter that none of
> these files exist, as all IOErrors are silenced by the method.
> 

I too looked at the source.  I understand why it ignores IOErrors
(though I'm not convinced it's a good idea), but I think I see a
problem with the ConfigParse module.  I would think it should raise
some error if it can't find any file at all in the list you provide. 
It seems to me that would be more useful than having an empty object.

Of course, it's probably not something we could change now...



More information about the Python-list mailing list