New submission from Wolfgang Maier:

The docs for Python3.4 havethis to say about the arguments to the dict 
constructor:

class dict(**kwarg)
class dict(mapping, **kwarg)
class dict(iterable, **kwarg)

    Return a new dictionary initialized from an optional positional argument 
and a possibly empty set of keyword arguments.

    If no positional argument is given, an empty dictionary is created. If a 
positional argument is given and it is a mapping object, a dictionary is 
created with the same key-value pairs as the mapping object. Otherwise, the 
positional argument must be an iterator object. Each item in the iterable must 
itself be an iterator with exactly two objects. The first object of each item 
becomes a key in the new dictionary, and the second object the corresponding 
value. If a key occurs more than once, the last value for that key becomes the 
corresponding value in the new dictionary.

This paragraph uses the term iterator twice when it should talk about an 
iterable instead.
I'm attaching the patch for this.

Best,
Wolfgang

----------
assignee: docs@python
components: Documentation
files: dict_doc.patch
keywords: patch
messages: 218784
nosy: docs@python, wolma
priority: normal
severity: normal
status: open
title: built-in types dict docs - construct dict from iterable, not iterator
Added file: http://bugs.python.org/file35292/dict_doc.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21533>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to