Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20539
| From | Zheng Li <dllizheng@gmail.com> |
|---|---|
| Subject | question about function pointer |
| Date | 2012-02-17 16:53 +0900 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5911.1329465188.27778.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
question about function pointer Zheng Li <dllizheng@gmail.com> - 2012-02-17 16:53 +0900
Re: question about function pointer Nobody <nobody@nowhere.com> - 2012-02-17 09:55 +0000
Re: question about function pointer 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-17 05:20 -0800
csiph-web