Commit 65da8605 authored by Jim Fulton's avatar Jim Fulton

Added __cmp__ from Greg Ward.

parent 0732739e
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
__doc__='''Python implementation of persistent base types __doc__='''Python implementation of persistent base types
$Id: PersistentMapping.py,v 1.10 2001/06/05 18:49:58 chrism Exp $''' $Id: PersistentMapping.py,v 1.11 2001/08/16 17:25:41 jim Exp $'''
__version__='$Revision: 1.10 $'[11:-2] __version__='$Revision: 1.11 $'[11:-2]
import Persistence import Persistence
import types import types
...@@ -158,3 +158,6 @@ class PersistentMapping(Persistence.Persistent): ...@@ -158,3 +158,6 @@ class PersistentMapping(Persistence.Persistent):
def values(self): def values(self):
return map(lambda k, d=self: d[k], self.keys()) return map(lambda k, d=self: d[k], self.keys())
def __cmp__(self,other):
return cmp(self._container, other._container)
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
__doc__='''Python implementation of persistent base types __doc__='''Python implementation of persistent base types
$Id: PersistentMapping.py,v 1.10 2001/06/05 18:49:58 chrism Exp $''' $Id: PersistentMapping.py,v 1.11 2001/08/16 17:25:41 jim Exp $'''
__version__='$Revision: 1.10 $'[11:-2] __version__='$Revision: 1.11 $'[11:-2]
import Persistence import Persistence
import types import types
...@@ -158,3 +158,6 @@ class PersistentMapping(Persistence.Persistent): ...@@ -158,3 +158,6 @@ class PersistentMapping(Persistence.Persistent):
def values(self): def values(self):
return map(lambda k, d=self: d[k], self.keys()) return map(lambda k, d=self: d[k], self.keys())
def __cmp__(self,other):
return cmp(self._container, other._container)
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
__doc__='''Python implementation of persistent base types __doc__='''Python implementation of persistent base types
$Id: mapping.py,v 1.10 2001/06/05 18:49:58 chrism Exp $''' $Id: mapping.py,v 1.11 2001/08/16 17:25:41 jim Exp $'''
__version__='$Revision: 1.10 $'[11:-2] __version__='$Revision: 1.11 $'[11:-2]
import Persistence import Persistence
import types import types
...@@ -158,3 +158,6 @@ class PersistentMapping(Persistence.Persistent): ...@@ -158,3 +158,6 @@ class PersistentMapping(Persistence.Persistent):
def values(self): def values(self):
return map(lambda k, d=self: d[k], self.keys()) return map(lambda k, d=self: d[k], self.keys())
def __cmp__(self,other):
return cmp(self._container, other._container)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment