Bugs item #1552892, was opened at 2006-09-05 11:35 Message generated for change (Comment added) made by suslik You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1552892&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Extension Modules Group: Python 2.4 Status: Closed Resolution: Invalid Priority: 5 Submitted By: daniel (suslik) Assigned to: Nobody/Anonymous (nobody) Summary: ConfigParser converts option names to lower case on set() Initial Comment: Python 2.4.2 Using set() in ConfigParser module converts all characters in option names to lower case. To reproduce: >>> import ConfigParser >>> cfg = ConfigParser.ConfigParser() >>> cfg.add_section('SectioN') >>> cfg.set('SectioN','OpTiOn","ValuE') >>> cfg.items('SectioN') [('option', 'ValuE')] ---------------------------------------------------------------------- >Comment By: daniel (suslik) Date: 2006-09-13 11:55 Message: Logged In: YES user_id=633916 Hmm, "broken" behavior by-design or not - it still makes it impossible to use ConfigParser straight out in KDE, where almost all option names are AaaaBbbbCccc. I just went with a completely different parser. http://wiki.python.org/moin/ConfigParserShootout ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2006-09-05 22:53 Message: Logged In: YES user_id=849994 Mark is correct. This is not a bug. ---------------------------------------------------------------------- Comment By: Mark Roberts (mark-roberts) Date: 2006-09-05 20:30 Message: Logged In: YES user_id=1591633 I can reproduce this on Win XP, Python 2.4, however, it doesn't seem to be a bug. In the docs (http://docs.python.org/lib/module-ConfigParser.html), it states that "All option names used in interpolation will be passed through the optionxform() method just like any other option name reference. For example, using the default implementation of optionxform() (which converts option names to lower case), the values "foo %(bar)s" and "foo %(BAR)s" are equivalent." You might consider subclassing if this is an inconvenience for you. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1552892&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com