A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-bugs-list/2001-October/008001.html below:

[Python-bugs-list] [ python-Bugs-476884 ] Configparser line continuations fail

[Python-bugs-list] [ python-Bugs-476884 ] Configparser line continuations fail [Python-bugs-list] [ python-Bugs-476884 ] Configparser line continuations failnoreply@sourceforge.net noreply@sourceforge.net
Wed, 31 Oct 2001 10:56:45 -0800
Bugs item #476884, was opened at 2001-10-31 10:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=476884&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Configparser line continuations fail

Initial Comment:
Configparser line continuations fail with a key error when the option is of mixed case.  Configparser maps all options to lowercase (presumably for Win compatibility) but it does the mapping through a method call (optionxform) which leaves the option name (optname) untransformed.  This causes a dictionary key error when continuation lines are encountered since the untransformed optname is used to build the continued line.

There are at least three possible fixes:

1.  Make options case sensitive by eliminating 
the optionxform method.  (My workaround is to 
overload the optionsxform method...)

2.  Replace optname by it's lower case equivalent when it is constructed and use the lower case form throughout.

3.  Insert calls to optionxform where the continuation lines are built.  Messy and inefficient, IMHO.

For greatest generality, there ought to be parameters which manage case sensitivity for section names and option names.















----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=476884&group_id=5470



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4