Łukasz Langa <luk...@langa.pl> added the comment:

Patch updated for a state when #9452 is applied.

Creating/overwriting sections with __setitem__ on the parser added. More 
thorough unit test suite for the mapping protocol.

No documentation created yet. 

Fred, if you applied #9452 you might review this patch, too (thanks in 
advance!). If it's more-less okay, I'll introduce documentation as well.

For the record, another difference in behaviour with a regular dictionary was 
discovered as well:
- by default, all keys in sections are accessible in a case-insensitive manner
  -- that means that for a section that holds key "a", both are True: "a" in 
parser["section"], "A" in parser["section"]
  -- but, `for option in parser["section"]` lists only `optionxform`ed  option 
key names

The default is compatible with the legacy API and of course may be changed by 
specifying `optionxform = str`.

----------
Added file: http://bugs.python.org/file18441/issue5412.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5412>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to