Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Nicolas Wavrant
ZODB
Commits
288f536f
Commit
288f536f
authored
Jan 22, 2003
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zodb_pickle(): Use a lambda for convenience.
parent
eeef9cff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
src/ZODB/tests/StorageTestBase.py
src/ZODB/tests/StorageTestBase.py
+1
-4
No files found.
src/ZODB/tests/StorageTestBase.py
View file @
288f536f
...
@@ -37,12 +37,9 @@ ZERO = '\0'*8
...
@@ -37,12 +37,9 @@ ZERO = '\0'*8
def
zodb_pickle
(
obj
):
def
zodb_pickle
(
obj
):
"""Create a pickle in the format expected by ZODB."""
"""Create a pickle in the format expected by ZODB."""
def
persistent_id
(
obj
):
return
getattr
(
obj
,
'_p_oid'
,
None
)
f
=
StringIO
()
f
=
StringIO
()
p
=
Pickler
(
f
,
1
)
p
=
Pickler
(
f
,
1
)
p
.
persistent_id
=
persistent_id
p
.
persistent_id
=
lambda
obj
:
getattr
(
obj
,
'_p_oid'
,
None
)
klass
=
obj
.
__class__
klass
=
obj
.
__class__
assert
not
hasattr
(
obj
,
'__getinitargs__'
),
"not ready for constructors"
assert
not
hasattr
(
obj
,
'__getinitargs__'
),
"not ready for constructors"
args
=
None
args
=
None
...
...
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