What is the meaning of the astarisk in Python
newsgroups at jhrothjr.com
Sun Sep 21 02:13:22 CEST 2003
"John Dean" <john at rygannon.com> wrote in message
news:3f6ce54f$0$10962$fa0fcedb at lovejoy.zen.co.uk...
> 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,
> 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."
> Best Regards
More information about the Python-list