Skip to content

Commit

Permalink
Remove PyPy enumerate workaround in _DequeRing; PyPy should be using …
Browse files Browse the repository at this point in the history
…_CFFIRing.
  • Loading branch information
jamadden committed May 19, 2015
1 parent b760c4b commit f711686
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions persistent/ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ def delete(self, pobj):
# uses equality semantics and we don't want to call the persistent
# object's __eq__ method (which might wake it up just after we
# tried to ghost it)
i = 0 # Using a manual numeric counter instead of enumerate() is much faster on PyPy
for o in self.ring:
for i, o in enumerate(self.ring):
if o is pobj:
del self.ring[i]
self.ring_oids.discard(pobj._p_oid)
return 1
i += 1

def move_to_head(self, pobj):
self.delete(pobj)
Expand Down

0 comments on commit f711686

Please sign in to comment.