question about function pointer

Zheng Li dllizheng at gmail.com
Fri Feb 17 02:53:00 EST 2012


def method1(a = None):
	print a

i can call it by
method1(*(), **{'a' : 1})

I am just curious why it works and how it works?
and what do *() and **{'a' : 1} mean?

when I type *() in python shell, error below happens

  File "<stdin>", line 1
    *()
    ^
SyntaxError: invalid syntax




More information about the Python-list mailing list