From 4d27d9e8b665490b9860a71e32acad95f29f06ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Fri, 29 Apr 2011 16:15:41 +0200 Subject: [PATCH 1/2] __class__ of a __class__ check worked only by chance. --- Lib/test/test_cfgparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py index a712b2b396e..1db92176f85 100644 --- a/Lib/test/test_cfgparser.py +++ b/Lib/test/test_cfgparser.py @@ -993,7 +993,7 @@ class RawConfigParserTestCase(BasicTestCase): cf.add_section(123) cf.set(123, 'this is sick', True) self.assertEqual(cf.get(123, 'this is sick'), True) - if cf._dict.__class__ is configparser._default_dict: + if cf._dict is configparser._default_dict: # would not work for SortedDict; only checking for the most common # default dictionary (OrderedDict) cf.optionxform = lambda x: x From 5c7419d4332a9929d8ba0db13d5e2c0db3aee160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Fri, 29 Apr 2011 16:16:36 +0200 Subject: [PATCH 2/2] Removed debugging leftovers. --- Lib/configparser.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/configparser.py b/Lib/configparser.py index 82b6f03061f..12ba5ad81cf 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -1057,8 +1057,6 @@ class RawConfigParser(MutableMapping): if not optname: e = self._handle_error(e, fpname, lineno, line) optname = self.optionxform(optname.rstrip()) - if hasattr(self, '__ping__'): - import pdb; pdb.set_trace() if (self._strict and (sectname, optname) in elements_added): raise DuplicateOptionError(sectname, optname,