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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
0e778c07
Commit
0e778c07
authored
Apr 21, 2000
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in get method.
parent
8d18922a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
9 deletions
+24
-9
src/Persistence/PersistentMapping.py
src/Persistence/PersistentMapping.py
+8
-3
src/ZODB/PersistentMapping.py
src/ZODB/PersistentMapping.py
+8
-3
src/persistent/mapping.py
src/persistent/mapping.py
+8
-3
No files found.
src/Persistence/PersistentMapping.py
View file @
0e778c07
...
...
@@ -85,12 +85,13 @@
__doc__
=
'''Python implementation of persistent base types
$Id: PersistentMapping.py,v 1.
7 2000/04/21 19:20:50 tseaver
Exp $'''
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
$Id: PersistentMapping.py,v 1.
8 2000/04/21 20:06:34 jim
Exp $'''
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
import
Persistence
import
types
_marker
=
[]
class
PersistentMapping
(
Persistence
.
Persistent
):
"""A persistent wrapper for mapping objects.
...
...
@@ -127,7 +128,11 @@ class PersistentMapping(Persistence.Persistent):
def
copy
(
self
):
return
self
.
__class__
(
self
.
_container
.
copy
())
def
get
(
self
,
key
,
default
=
None
):
return
self
.
_container
.
get
(
key
,
default
)
def
get
(
self
,
key
,
default
=
_marker
):
if
default
is
_marker
:
return
self
.
_container
.
get
(
key
)
else
:
return
self
.
_container
.
get
(
key
,
default
)
def
has_key
(
self
,
key
):
return
self
.
_container
.
has_key
(
key
)
...
...
src/ZODB/PersistentMapping.py
View file @
0e778c07
...
...
@@ -85,12 +85,13 @@
__doc__
=
'''Python implementation of persistent base types
$Id: PersistentMapping.py,v 1.
7 2000/04/21 19:20:50 tseaver
Exp $'''
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
$Id: PersistentMapping.py,v 1.
8 2000/04/21 20:06:34 jim
Exp $'''
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
import
Persistence
import
types
_marker
=
[]
class
PersistentMapping
(
Persistence
.
Persistent
):
"""A persistent wrapper for mapping objects.
...
...
@@ -127,7 +128,11 @@ class PersistentMapping(Persistence.Persistent):
def
copy
(
self
):
return
self
.
__class__
(
self
.
_container
.
copy
())
def
get
(
self
,
key
,
default
=
None
):
return
self
.
_container
.
get
(
key
,
default
)
def
get
(
self
,
key
,
default
=
_marker
):
if
default
is
_marker
:
return
self
.
_container
.
get
(
key
)
else
:
return
self
.
_container
.
get
(
key
,
default
)
def
has_key
(
self
,
key
):
return
self
.
_container
.
has_key
(
key
)
...
...
src/persistent/mapping.py
View file @
0e778c07
...
...
@@ -85,12 +85,13 @@
__doc__
=
'''Python implementation of persistent base types
$Id: mapping.py,v 1.
7 2000/04/21 19:20:50 tseaver
Exp $'''
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
$Id: mapping.py,v 1.
8 2000/04/21 20:06:34 jim
Exp $'''
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
import
Persistence
import
types
_marker
=
[]
class
PersistentMapping
(
Persistence
.
Persistent
):
"""A persistent wrapper for mapping objects.
...
...
@@ -127,7 +128,11 @@ class PersistentMapping(Persistence.Persistent):
def
copy
(
self
):
return
self
.
__class__
(
self
.
_container
.
copy
())
def
get
(
self
,
key
,
default
=
None
):
return
self
.
_container
.
get
(
key
,
default
)
def
get
(
self
,
key
,
default
=
_marker
):
if
default
is
_marker
:
return
self
.
_container
.
get
(
key
)
else
:
return
self
.
_container
.
get
(
key
,
default
)
def
has_key
(
self
,
key
):
return
self
.
_container
.
has_key
(
key
)
...
...
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