[pygtk] positional and keyword parameters
Gian Mario Tagliaretti
gianmt at gnome.org
Fri Jun 22 20:00:38 WST 2007
2007/6/22, varun_shrivastava <shrivastavavarun a yahoo.co.in>:
> whats the difference between positional and keyword parameter
This is a python general question, it has nothing to do with pygtk
itself, anyway:
def func(arg1, arg2, arg3=something, arg4=someotherthings):
pass
arg1 and arg2 are positional args while arg3 and arg4 are keyword args.
you could write the same as
def func(*args, **kwargs)
If you mean the difference in parsing the arguments with python C API,
the concept is the same, refer to
http://docs.python.org/api/arg-parsing.html for a good explanation.
cheers
--
Gian Mario Tagliaretti
More information about the pygtk
mailing list