docs patch: dicts and sets

Raymond Hettinger python at rcn.com
Fri May 11 21:41:32 EDT 2007


On May 11, 5:59 pm, "Alan Isaac" <ais... at american.edu> wrote:
> This is an attempt to synthesize Bill and Carsten's proposals.
> (I'm changing the subject line to better match the topic.)
>
> http://docs.python.org/lib/typesmapping.html:for footnote (3)
>
>         Keys and values are listed in an arbitrary order.  This order is
>         indeterminate and generally depends on factors outside the scope of
> the
>         containing program.  However, if items(), keys(), values(),
>         iteritems(), iterkeys(), and itervalues() are called with no
>         intervening modifications to the dictionary, the lists will directly
>         correspond.
>
> http://docs.python.org/lib/types-set.html:append a new sentence to 2nd par.
>
>         Iteration over a set returns elements in an indeterminate
> order,which
>         generally depends on factors outside the scope of the containing
>         program.

This doesn't improve the docs. It suggests some mystic forces at work
while offering nothing that is actionable or that improves
understanding.   Adding this kind of muck will only make the docs less
clear.

Recommend dropping this one and moving on to solve some real problems.


Raymond





More information about the Python-list mailing list