What's the business with the asterisk?
Tim Chase
python.list at tim.thechases.com
Sat Jan 24 07:46:34 EST 2009
More information about the Python-list mailing list
Sat Jan 24 07:46:34 EST 2009
- Previous message (by thread): What's the business with the asterisk?
- Next message (by thread): What's the business with the asterisk?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From time to time I spot an asterisk (*) used in the Python code > _outside_ the usual *args or **kwargs application. > > E.g. here: http://www.norvig.com/python-lisp.html > > def transpose (m): > return zip(*m) > >>> transpose([[1,2,3], [4,5,6]]) > [(1, 4), (2, 5), (3, 6)] > > What does *m mean in this example and how does it do the magic here? There's a good writeup on args/kwargs at http://www.megasolutions.net/python/-args-and---kwargs-78766.aspx (looks like the content was gleaned from comp.lang.python and credited) -tkc
- Previous message (by thread): What's the business with the asterisk?
- Next message (by thread): What's the business with the asterisk?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list