Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
37130a76
Commit
37130a76
authored
Apr 04, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in persistent mapping that caused extraneous records to be
written.
parent
d61354d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
src/ZODB/Persistence.py
src/ZODB/Persistence.py
+11
-7
No files found.
src/ZODB/Persistence.py
View file @
37130a76
...
...
@@ -4,7 +4,7 @@
__doc__
=
'''Python implementation of persistent base types
$Id: Persistence.py,v 1.
7 1997/04/03 17:33:32
jim Exp $'''
$Id: Persistence.py,v 1.
8 1997/04/04 13:52:27
jim Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
...
@@ -60,6 +60,10 @@ $Id: Persistence.py,v 1.7 1997/04/03 17:33:32 jim Exp $'''
# (540) 371-6909
#
# $Log: Persistence.py,v $
# Revision 1.8 1997/04/04 13:52:27 jim
# Fixed bug in persistent mapping that caused extraneous records to be
# written.
#
# Revision 1.7 1997/04/03 17:33:32 jim
# Changed to pass transaction to jar store method.
#
...
...
@@ -85,7 +89,7 @@ $Id: Persistence.py,v 1.7 1997/04/03 17:33:32 jim Exp $'''
#
#
#
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
class
Persistent
:
"""
\
...
...
@@ -267,22 +271,22 @@ class PersistentMapping(Persistent):
def
__setitem__
(
self
,
key
,
v
):
self
.
_container
[
key
]
=
v
try
:
del
self
.
_keys
try
:
del
self
.
_
v_
keys
except
:
pass
self
.
__changed__
(
1
)
def
__delitem__
(
self
,
key
):
del
self
.
_container
[
key
]
try
:
del
self
.
_keys
try
:
del
self
.
_
v_
keys
except
:
pass
self
.
__changed__
(
1
)
def
__len__
(
self
):
return
len
(
self
.
_container
)
def
keys
(
self
):
try
:
return
self
.
_keys
try
:
return
self
.
_
v_
keys
except
:
pass
keys
=
self
.
_keys
=
filter
(
keys
=
self
.
_
v_
keys
=
filter
(
lambda
k
:
k
[:
1
]
!=
'_'
,
self
.
_container
.
keys
())
keys
.
sort
()
...
...
@@ -290,7 +294,7 @@ class PersistentMapping(Persistent):
def
clear
(
self
):
self
.
_container
=
{}
if
hasattr
(
self
,
'_
keys'
):
del
self
.
_keys
if
hasattr
(
self
,
'_
v_keys'
):
del
self
.
_v
_keys
def
values
(
self
):
return
map
(
lambda
k
,
d
=
self
:
d
[
k
],
self
.
keys
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment