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
a5941f86
Commit
a5941f86
authored
Oct 26, 2012
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Plain Diff
#16206: merge with 3.2.
parents
8b0f3ad9
a20879ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+6
-6
No files found.
Doc/library/stdtypes.rst
View file @
a5941f86
...
...
@@ -2976,13 +2976,13 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
replaces the value from the positional argument.
To illustrate, the following examples all return a dictionary equal to
``{"one": 1, "two": 2}``::
``{"one": 1, "two": 2
, "three": 3
}``::
>>> a = dict(one=1, two=2)
>>> b =
dict({'one': 1, 'two': 2})
>>> c = dict(zip(
('one', 'two'), (1, 2)
))
>>> d = dict([
['two', 2], ['one', 1]
])
>>> e =
{"one": 1, "two": 2}
>>> a = dict(one=1, two=2
, three=3
)
>>> b =
{'one': 1, 'two': 2, 'three': 3}
>>> c = dict(zip(
['one', 'two', 'three'], [1, 2, 3]
))
>>> d = dict([
('two', 2), ('one', 1), ('three', 3)
])
>>> e =
dict({'three': 3, 'one': 1, 'two': 2})
>>> a == b == c == d == e
True
...
...
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