> On 7 Jan 2019, at 03:06, Richard Damon <rich...@damon-family.org> wrote:
> 
> For something like reading options from a config file, I would use a
> call that specifies the key and a value to use if the key isn't present,
> and inside that function I might use a try to handle any exception
> caused when processing the key, and it could return the default.

Most config file APIs I have used have has_section and has_key type functions 
that remove the need to catch exceptions.

What config file API are you using htat is missing this?

Barry


_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to