diff -r ea4728ef5956 Doc/tutorial/controlflow.rst --- a/Doc/tutorial/controlflow.rst Sat Feb 04 17:36:47 2017 -0800 +++ b/Doc/tutorial/controlflow.rst Sun Feb 05 17:13:58 2017 +0200 @@ -492,16 +492,15 @@ for arg in arguments: print(arg) print("-" * 40) - keys = sorted(keywords.keys()) - for kw in keys: + for kw in keywords: print(kw, ":", keywords[kw]) It could be called like this:: cheeseshop("Limburger", "It's very runny, sir.", "It's really very, VERY runny, sir.", + client="John Cleese", shopkeeper="Michael Palin", - client="John Cleese", sketch="Cheese Shop Sketch") and of course it would print: @@ -517,9 +516,6 @@ shopkeeper : Michael Palin sketch : Cheese Shop Sketch -Note that the list of keyword argument names is created by sorting the result -of the keywords dictionary's ``keys()`` method before printing its contents; -if this is not done, the order in which the arguments are printed is undefined. .. _tut-arbitraryargs: