What is the meaning of the astarisk in Python
John Roth
newsgroups at jhrothjr.com
Sat Sep 20 20:13:22 EDT 2003
"John Dean" <john at rygannon.com> wrote in message
news:3f6ce54f$0$10962$fa0fcedb at lovejoy.zen.co.uk...
> Hi
> Below is a line taken from Andy Dustman's MySQLdb module:
> def Connect(*args, **kwargs):
>
> I would be grateful if somebody explain the meaning of the astarisks,
since
> I was under the impression that pointers are not used in Python and the
> above look very must like pointers to me
One asterisk creates a list of all positional arguements,
two asterisks creates a dictionary of all keyword arguements.
"All" means "not otherwise represented in the parameter list."
John Roth
>
> --
> Best Regards
> John
More information about the Python-list
mailing list