DangerOnTheRanger

Untitled

Nov 2nd, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.96 KB | None | 0 0
  1. diff -r a957182a866f src/obengine/datatypes.py
  2. --- a/src/obengine/datatypes.py Fri Aug 24 11:58:06 2012 -0500
  3. +++ b/src/obengine/datatypes.py Fri Nov 02 15:18:09 2012 -0500
  4. @@ -26,7 +26,10 @@
  5.  __date__ = "$May 4, 2011 8:08:03 PM$"
  6.  
  7.  
  8. -import collections
  9. +try:
  10. +    from collections import MutableSet
  11. +except AttributeError:
  12. +    from sets import Set as MutableSet
  13.  import heapq
  14.  
  15.  import obengine.event
  16. @@ -155,7 +158,7 @@
  17.          self._extensions[name] = extension
  18.  
  19.  
  20. -class orderedset(collections.MutableSet):
  21. +class orderedset(MutableSet):
  22.      """Ordered set - like a set, but remembers insertion order
  23.      Based on Raymond Hettinger's ASPN recipe (
  24.      http://code.activestate.com/recipes/576694/).
  25. @@ -257,7 +260,7 @@
  26.          self.clear()
  27.  
  28.  
  29. -class heap(collections.Sequence):
  30. +class heap(object):
  31.      """OO wrapper around the standard heapq module
  32.      This class provides an object-oriented wrapper around the
  33.      standard heapq module.
Advertisement
Add Comment
Please, Sign In to add comment