Commit 4a9ab430 authored by Chris McDonough's avatar Chris McDonough

re-modified keys() method to prevent mutability in case where keys list is recomputed.

parent 60c3d8b8
...@@ -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.9 2001/06/05 18:45:33 chrism Exp $''' $Id: PersistentMapping.py,v 1.10 2001/06/05 18:49:58 chrism Exp $'''
__version__='$Revision: 1.9 $'[11:-2] __version__='$Revision: 1.10 $'[11:-2]
import Persistence import Persistence
import types import types
...@@ -146,7 +146,7 @@ class PersistentMapping(Persistence.Persistent): ...@@ -146,7 +146,7 @@ class PersistentMapping(Persistence.Persistent):
lambda k: not isinstance(k,types.StringType) or k[:1]!='_', lambda k: not isinstance(k,types.StringType) or k[:1]!='_',
self._container.keys()) self._container.keys())
keys.sort() keys.sort()
return keys return list(keys)
def update(self, b): def update(self, b):
a=self._container a=self._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.9 2001/06/05 18:45:33 chrism Exp $''' $Id: PersistentMapping.py,v 1.10 2001/06/05 18:49:58 chrism Exp $'''
__version__='$Revision: 1.9 $'[11:-2] __version__='$Revision: 1.10 $'[11:-2]
import Persistence import Persistence
import types import types
...@@ -146,7 +146,7 @@ class PersistentMapping(Persistence.Persistent): ...@@ -146,7 +146,7 @@ class PersistentMapping(Persistence.Persistent):
lambda k: not isinstance(k,types.StringType) or k[:1]!='_', lambda k: not isinstance(k,types.StringType) or k[:1]!='_',
self._container.keys()) self._container.keys())
keys.sort() keys.sort()
return keys return list(keys)
def update(self, b): def update(self, b):
a=self._container a=self._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.9 2001/06/05 18:45:33 chrism Exp $''' $Id: mapping.py,v 1.10 2001/06/05 18:49:58 chrism Exp $'''
__version__='$Revision: 1.9 $'[11:-2] __version__='$Revision: 1.10 $'[11:-2]
import Persistence import Persistence
import types import types
...@@ -146,7 +146,7 @@ class PersistentMapping(Persistence.Persistent): ...@@ -146,7 +146,7 @@ class PersistentMapping(Persistence.Persistent):
lambda k: not isinstance(k,types.StringType) or k[:1]!='_', lambda k: not isinstance(k,types.StringType) or k[:1]!='_',
self._container.keys()) self._container.keys())
keys.sort() keys.sort()
return keys return list(keys)
def update(self, b): def update(self, b):
a=self._container a=self._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