[docs] 4.7.2. Keyword Arguments - Small Typo: 'sort()' -> 'sorted()'
sandro.tosi at gmail.com
Mon May 16 23:51:03 CEST 2011
On Sat, Apr 30, 2011 at 18:33, Joe Mirizio <joemirizio at yahoo.com> wrote:
> From 4.7.2. Keyword Arguments:
> def cheeseshop(kind, *arguments, **keywords):
> print "-- Do you have any", kind, "?"
> print "-- I'm sorry, we're all out of", kind
> for arg in arguments:
> print arg
> print "-" * 40
> keys = sorted(keywords.keys())
> for kw in keys:
> print kw, ":", keywords[kw]
> Note that the sort() method of the list of keyword argument names is
> called before printing the contents of the keywords dictionary; if this is
> not done, the order in which the arguments are printed is undefined.
I've just opened http://bugs.python.org/issue12092 to track this.
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
More information about the docs