20 Jan
2011
20 Jan
'11
6:57 p.m.
On Thu, Jan 20, 2011 at 11:42 AM, Guido van Rossum <guido@python.org> wrote: ..
In addition, I wonder what the semantics would be if the caller passed **d where d was an *unordered* dict...
Presumably, the caller would know whether the called function is sensitive to the order of keyword arguments and will use odict when it matters. The function called as say f(x=1, y=2, **d) will initialize its internal keyword odict with an equivalent of kwds = odict([('x', 1), ('y', 2)]); kwd.update(d.items()) and exhibit undefined behavior if d is unordered and f depends on the order of keywords.