Order of keyword arguments
jam at quark.emich.edu
Sun Nov 21 09:42:45 CET 1999
On Sun, Nov 21, 1999 at 01:33:23AM -0500, Andres Corrada wrote:
> Can one access the order in which keyword arguments were passed to a
> function? I want to call a function with the keyword syntax: f(
> foo='theFooString', bar='theBarString' ) and use the fact that foo was
> listed first so I can do something like:
> def f( **kw ):
> Process keyword arguments remembering the order in which the were used
> to call the function.
> Print first keyword
> Print second keyword
keyword arguments are passed as a dictionary, and thus the 'order' of the
arguments will not be preserved. what is the advantage you see to being able
to obtain that information? wouldn't a redesign of the interface keep things
simpler and increase the likelihood of success?
hope that helps.
|| visit gfd <http://quark.emich.edu/>
|| psa member #293 <http://www.python.org/>
|| New Image Systems & Services, Inc. <http://www.newimage.com/>
More information about the Python-list