Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r78384:e99ce6af254c Date: 2015-07-01 19:08 +0200 http://bitbucket.org/pypy/pypy/changeset/e99ce6af254c/
Log: Minor optimization 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 @@ -194,9 +194,9 @@ def switch_to_object_strategy(self): list_w = self.getitems() - self.strategy = self.space.fromcache(ObjectListStrategy) - # XXX this is quite indirect - self.init_from_list_w(list_w) + object_strategy = self.space.fromcache(ObjectListStrategy) + self.strategy = object_strategy + object_strategy.init_from_list_w(self, list_w) def _temporarily_as_objects(self): if self.strategy is self.space.fromcache(ObjectListStrategy): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit