arguments to functions
Chris Liechti
cliechti at gmx.net
Sun Jun 30 13:16:19 EDT 2002
Uwe Mayer <merkosh at hadiko.de> wrote in
news:MPG.178955a4fc8bfc1c989680 at news.rz.uni-karlsruhe.de:
> I wanted to pass one named and a collection of unnamed (an arbitrary
> number) to a function:
def f(*args, **kwargs):
print "positional args:", args
print "keyword args:", kwargs
if kwargs.has_attr("expected"):
print "Expected was set to", kwargs["expected"]
does that help somehow? :-)
chris
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list