What is the meaning of the astarisk in Python

Bob Gailer bgailer at alum.rpi.edu
Sat Sep 20 23:19:36 EDT 2003


At 06:13 PM 9/20/2003, John Roth wrote:


>"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,

Do you mean tuple?

>two asterisks creates a dictionary of all keyword arguements.
>"All" means "not otherwise represented in the parameter list."

Bob Gailer
bgailer at alum.rpi.edu
303 442 2625
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003


More information about the Python-list mailing list