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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
018047e5
Commit
018047e5
authored
Feb 16, 2001
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sets don't have items.
parent
4ac250c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
src/BTrees/SetTemplate.c
src/BTrees/SetTemplate.c
+0
-2
src/BTrees/TreeSetTemplate.c
src/BTrees/TreeSetTemplate.c
+0
-2
src/BTrees/tests/testBTrees.py
src/BTrees/tests/testBTrees.py
+8
-9
No files found.
src/BTrees/SetTemplate.c
View file @
018047e5
...
...
@@ -205,8 +205,6 @@ static struct PyMethodDef Set_methods[] = {
"__setstate__() -- Set the state of the object"
},
{
"keys"
,
(
PyCFunction
)
bucket_keys
,
METH_VARARGS
,
"keys() -- Return the keys"
},
{
"items"
,
(
PyCFunction
)
bucket_keys
,
METH_VARARGS
,
"items() -- Return the items"
},
{
"has_key"
,
(
PyCFunction
)
bucket_has_key
,
METH_VARARGS
,
"has_key(key) -- Test whether the bucket contains the given key"
},
{
"clear"
,
(
PyCFunction
)
bucket_clear
,
METH_VARARGS
,
...
...
src/BTrees/TreeSetTemplate.c
View file @
018047e5
...
...
@@ -114,8 +114,6 @@ static struct PyMethodDef TreeSet_methods[] = {
"has_key(key) -- Test whether the bucket contains the given key"
},
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_VARARGS
,
"keys() -- Return the keys"
},
{
"items"
,
(
PyCFunction
)
BTree_keys
,
METH_VARARGS
,
"items() -- Return the items"
},
{
"maxKey"
,
(
PyCFunction
)
BTree_maxKey
,
METH_VARARGS
,
"maxKey([key]) -- Fine the maximum key
\n\n
"
"If an argument is given, find the maximum <= the argument"
},
...
...
src/BTrees/tests/testBTrees.py
View file @
018047e5
...
...
@@ -135,7 +135,10 @@ class Base:
try
:
root
=
self
.
_getRoot
()
#XXX BTree stuff doesn't implement comparison
assert
list
(
root
[
't'
].
items
())
==
list
(
t
.
items
())
if
hasattr
(
t
,
'items'
):
assert
list
(
root
[
't'
].
items
())
==
list
(
t
.
items
())
else
:
assert
list
(
root
[
't'
].
keys
())
==
list
(
t
.
keys
())
finally
:
self
.
_closeDB
(
root
)
self
.
_delDB
()
...
...
@@ -157,7 +160,10 @@ class Base:
root
=
self
.
_getRoot
()
root
[
't'
].
_p_changed
=
None
get_transaction
().
commit
()
assert
list
(
root
[
't'
].
items
())
==
list
(
t
.
items
())
if
hasattr
(
t
,
'items'
):
assert
list
(
root
[
't'
].
items
())
==
list
(
t
.
items
())
else
:
assert
list
(
root
[
't'
].
keys
())
==
list
(
t
.
keys
())
finally
:
self
.
_closeDB
(
root
)
self
.
_delDB
()
...
...
@@ -303,13 +309,6 @@ class NormalSetTests(Base):
t
=
self
.
t
assert
not
t
.
has_key
(
1
)
def
testItems
(
self
):
t
=
self
.
t
t
.
insert
(
1
)
t
.
insert
(
3
)
t
.
insert
(
5
)
assert
lsubtract
(
t
.
items
(),
[
1
,
3
,
5
])
==
[],
t
.
items
()
def
testKeys
(
self
):
t
=
self
.
t
r
=
xrange
(
1000
)
...
...
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