[pypy-commit] pypy set-strategies: _newobj moved to W_SetObject and W_FrozenSetObject
l.diekmann
noreply at buildbot.pypy.org
Thu Nov 10 13:50:58 CET 2011
Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: set-strategies
Changeset: r49190:167cc1b5687a
Date: 2011-07-19 14:06 +0200
http://bitbucket.org/pypy/pypy/changeset/167cc1b5687a/
Log: _newobj moved to W_SetObject and W_FrozenSetObject
diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -48,19 +48,6 @@
obj.sstorage = storage
return obj
- def _newobj(w_self, space, w_iterable):
- """Make a new set or frozenset by taking ownership of 'rdict_w'."""
- #return space.call(space.type(w_self),W_SetIterObject(rdict_w))
- objtype = type(w_self)
- if objtype is W_SetObject:
- obj = W_SetObject(space, w_iterable)
- elif objtype is W_FrozensetObject:
- obj = W_FrozensetObject(space, w_iterable)
- else:
- obj = space.call_function(space.type(w_self), w_iterable)
- assert isinstance(obj, W_BaseSetObject)
- return obj
-
_lifeline_ = None
def getweakref(self):
return self._lifeline_
More information about the pypy-commit
mailing list