[docs] I found misdescription

kk6 kekelo1603 at gmail.com
Tue May 31 10:31:39 CEST 2011


Dear Python documentation Team.

I am Japanese Python user.

I found misdescription in following url.
http://docs.python.org/py3k/library/collections.html#collections.OrderedDict

The missdescription is in this page's "move_to_end" method's example.

----------------------------------------------------------------------
>>> d = OrderedDict.fromkeys('abcde')
>>> d.move_to_end('b')
>>> ''.join(d.keys)
'acdeb'
>>> d.move_to_end('b', last=False)
>>> ''.join(d.keys)
'bacde'
----------------------------------------------------------------------
Above the example's line3 and line6, "d.keys" is lack of parentheses
of callable.
It raise TypeError in this case to carry along.

Respectfully,

Hiro Ashiya
@kk6 (in twitter)


More information about the docs mailing list