Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
121c98cc
Commit
121c98cc
authored
Apr 14, 2006
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo fixes
parent
c7095843
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Doc/lib/libcollections.tex
Doc/lib/libcollections.tex
+2
-2
No files found.
Doc/lib/libcollections.tex
View file @
121c98cc
...
...
@@ -279,7 +279,7 @@ a sequence of key-value pairs into a dictionary of lists:
When each key is encountered for the first time, it is not already in the
mapping; so an entry is automatically created using the
\member
{
default
_
factory
}
function which returns an empty
\class
{
list
}
. The
\method
{
list.append()
}
operation then attaches the value the new list. When
\method
{
list.append()
}
operation then attaches the value t
o t
he new list. When
keys are encountered again, the look-up proceeds normally (returning the list
for that key) and the
\method
{
list.append()
}
operation adds another value to
the list. This technique is simpler and faster than an equivalent technique
...
...
@@ -308,7 +308,7 @@ languages):
[('i', 4), ('p', 2), ('s', 4), ('m', 1)]
\end{verbatim}
When a letter i
n
first encountered, it is missing from the mapping, so the
When a letter i
s
first encountered, it is missing from the mapping, so the
\member
{
default
_
factory
}
function calls
\function
{
int()
}
to supply a default
count of zero. The increment operation then builds of the count for each
letter. This technique makes counting simpler and faster than an equivalent
...
...
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