[Python-checkins] cpython (3.2): __class__ of a __class__ check worked only by chance.

lukasz.langa python-checkins at python.org
Fri Apr 29 16:18:10 CEST 2011


http://hg.python.org/cpython/rev/b7309b24528d
changeset:   69686:b7309b24528d
branch:      3.2
parent:      69683:0b21d948eabb
user:        Łukasz Langa <lukasz at langa.pl>
date:        Fri Apr 29 16:15:41 2011 +0200
summary:
  __class__ of a __class__ check worked only by chance.

files:
  Lib/test/test_cfgparser.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py
--- a/Lib/test/test_cfgparser.py
+++ b/Lib/test/test_cfgparser.py
@@ -993,7 +993,7 @@
         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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list