Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: value-profiling Changeset: r79030:75ee3e2981e2 Date: 2015-08-17 12:31 +0200 http://bitbucket.org/pypy/pypy/changeset/75ee3e2981e2/
Log: fix translation diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py --- a/pypy/objspace/std/listobject.py +++ b/pypy/objspace/std/listobject.py @@ -145,7 +145,7 @@ if type(list_w[i]) is not type(w_firstobj): break else: - return cache.get_or_build(type(w_firstobj)) + return cache.get_or_build(w_firstobj.__class__) return cache.generic_strategy @@ -958,7 +958,7 @@ strategy = self.space.fromcache(FloatListStrategy) else: cache = self.space.fromcache(FixedClsStrategyCache) - strategy = cache.get_or_build(type(w_item)) + strategy = cache.get_or_build(w_item.__class__) storage = strategy.get_empty_storage(self.get_sizehint()) w_list.strategy = strategy @@ -1635,7 +1635,7 @@ def is_correct_type(self, w_obj): cls = self.get_known_cls() if cls is not None: - return type(w_obj) is cls + return w_obj.__class__ is cls return True def list_is_correct_type(self, w_list): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit