Doc for extended call syntax; was: Re: unzip array of arrays?

Bryan Olson fakeaddress at nowhere.org
Sat Jan 24 10:02:50 EST 2009


Tobiah wrote:
> Where can I read about
> this mysterious use of the '*'?

Hmmm... that's a harder question than I thought. Am I missing it, or 
does Python's doc need a write-up of the extended call syntax?

> It only works in the
> context of the zip() function.  It's hard to understand
> how the interpreter handles that.

It works generally, for any callable. See the doc for 'apply':
 
http://docs.python.org/library/functions.html#non-essential-built-in-functions

It not only works in a call, but also in function definitions. You can 
call a function with the extended call syntax whether or not is defined 
with * and ** arguments.


-- 
--Bryan



More information about the Python-list mailing list