On Fri, Apr 25, 2014 at 3:12 PM, Ethan Furman <et...@stoneleaf.us> wrote:
> Perhaps an enhancement request then:  a way to provide a regex that keys
> must match, with an exception raised when a key doesn't.  That way the
> safety belt could be used when desired.

You can subclass the parser class you're using and override the
``optionxform`` method to perform the checks you want for option
names.  I don't know if current versions provide a similar hook to
validate section names; providing *that* would be an excellent
enhancement.


  -Fred

-- 
Fred L. Drake, Jr.    <fred at fdrake.net>
"A storm broke loose in my mind."  --Albert Einstein
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to