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
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[] = {
...
@@ -205,8 +205,6 @@ static struct PyMethodDef Set_methods[] = {
"__setstate__() -- Set the state of the object"
},
"__setstate__() -- Set the state of the object"
},
{
"keys"
,
(
PyCFunction
)
bucket_keys
,
METH_VARARGS
,
{
"keys"
,
(
PyCFunction
)
bucket_keys
,
METH_VARARGS
,
"keys() -- Return the keys"
},
"keys() -- Return the keys"
},
{
"items"
,
(
PyCFunction
)
bucket_keys
,
METH_VARARGS
,
"items() -- Return the items"
},
{
"has_key"
,
(
PyCFunction
)
bucket_has_key
,
METH_VARARGS
,
{
"has_key"
,
(
PyCFunction
)
bucket_has_key
,
METH_VARARGS
,
"has_key(key) -- Test whether the bucket contains the given key"
},
"has_key(key) -- Test whether the bucket contains the given key"
},
{
"clear"
,
(
PyCFunction
)
bucket_clear
,
METH_VARARGS
,
{
"clear"
,
(
PyCFunction
)
bucket_clear
,
METH_VARARGS
,
...
...
src/BTrees/TreeSetTemplate.c
View file @
018047e5
...
@@ -114,8 +114,6 @@ static struct PyMethodDef TreeSet_methods[] = {
...
@@ -114,8 +114,6 @@ static struct PyMethodDef TreeSet_methods[] = {
"has_key(key) -- Test whether the bucket contains the given key"
},
"has_key(key) -- Test whether the bucket contains the given key"
},
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_VARARGS
,
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_VARARGS
,
"keys() -- Return the keys"
},
"keys() -- Return the keys"
},
{
"items"
,
(
PyCFunction
)
BTree_keys
,
METH_VARARGS
,
"items() -- Return the items"
},
{
"maxKey"
,
(
PyCFunction
)
BTree_maxKey
,
METH_VARARGS
,
{
"maxKey"
,
(
PyCFunction
)
BTree_maxKey
,
METH_VARARGS
,
"maxKey([key]) -- Fine the maximum key
\n\n
"
"maxKey([key]) -- Fine the maximum key
\n\n
"
"If an argument is given, find the maximum <= the argument"
},
"If an argument is given, find the maximum <= the argument"
},
...
...
src/BTrees/tests/testBTrees.py
View file @
018047e5
...
@@ -135,7 +135,10 @@ class Base:
...
@@ -135,7 +135,10 @@ class Base:
try
:
try
:
root
=
self
.
_getRoot
()
root
=
self
.
_getRoot
()
#XXX BTree stuff doesn't implement comparison
#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
:
finally
:
self
.
_closeDB
(
root
)
self
.
_closeDB
(
root
)
self
.
_delDB
()
self
.
_delDB
()
...
@@ -157,7 +160,10 @@ class Base:
...
@@ -157,7 +160,10 @@ class Base:
root
=
self
.
_getRoot
()
root
=
self
.
_getRoot
()
root
[
't'
].
_p_changed
=
None
root
[
't'
].
_p_changed
=
None
get_transaction
().
commit
()
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
:
finally
:
self
.
_closeDB
(
root
)
self
.
_closeDB
(
root
)
self
.
_delDB
()
self
.
_delDB
()
...
@@ -303,13 +309,6 @@ class NormalSetTests(Base):
...
@@ -303,13 +309,6 @@ class NormalSetTests(Base):
t
=
self
.
t
t
=
self
.
t
assert
not
t
.
has_key
(
1
)
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
):
def
testKeys
(
self
):
t
=
self
.
t
t
=
self
.
t
r
=
xrange
(
1000
)
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