Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
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
BTrees
Commits
3b1ea272
Commit
3b1ea272
authored
Oct 25, 2019
by
Éloi Rivard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Builds documentation with python3
parent
59faf125
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
17 deletions
+26
-17
docs/overview.rst
docs/overview.rst
+25
-16
tox.ini
tox.ini
+1
-1
No files found.
docs/overview.rst
View file @
3b1ea272
...
...
@@ -103,16 +103,12 @@ exclusive of the range's endpoints.
1
>>> t.minKey(1.5) # smallest key >= 1.5
2
>>> for k in t.keys():
... print k,
1 2 3 4
>>> for k in t: # new in ZODB 3.3
... print k,
1 2 3 4
>>> for pair in t.iteritems(): # new in ZODB 3.3
... print pair,
...
(1, 'red') (2, 'green') (3, 'blue') (4, 'spades')
>>> [k for k in t.keys()]
[1, 2, 3, 4]
>>> [k for k in t] # new in ZODB 3.3
[1, 2, 3, 4]
>>> [pair for pair in t.iteritems()] # new in ZODB 3.3
[(1, 'red'), (2, 'green'), (3, 'blue'), (4, 'spades')]
>>> t.has_key(4) # returns a true value, but exactly what undefined
2
>>> t.has_key(5)
...
...
@@ -242,11 +238,11 @@ structure is stored to a database, though.
... pass
...
>>> a, b = C(), C()
>>> print
a < b
# this may print 0 if you try it
>>> print
(a < b)
# this may print 0 if you try it
True
>>> del a, b
>>> a, b = C(), C()
>>> print
a < b
# and this may print 0 or 1
>>> print
(a < b)
# and this may print 0 or 1
False
>>>
...
...
@@ -334,9 +330,13 @@ Example
>>> list(s)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> for i in s: # the output is undefined
... print
i,
... print
(i)
... s.remove(i)
0 2 4 6 8
0
2
4
6
8
Traceback (most recent call last):
File "<stdin>", line 1, in ?
RuntimeError: the bucket being iterated changed size
...
...
@@ -353,9 +353,18 @@ of the keys. Example
>>> from BTrees.IIBTree import *
>>> s = IISet(range(10))
>>> for i in list(s.keys()): # this is well defined
... print
i,
... print
(i)
... s.remove(i)
0 1 2 3 4 5 6 7 8 9
0
1
2
3
4
5
6
7
8
9
>>> list(s)
[]
>>>
...
...
tox.ini
View file @
3b1ea272
...
...
@@ -36,7 +36,7 @@ deps =
[testenv:docs]
basepython
=
python
2
.7
python
3
.7
commands
=
sphinx-build
-b
html
-d
docs/_build/doctrees
docs
docs/_build/html
sphinx-build
-b
doctest
-d
docs/_build/doctrees
docs
docs/_build/doctest
...
...
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