On Wed, Dec 16, 2009 at 10:19 AM, Mark Larsen <larsen...@gmail.com> wrote: >> I don't understand what '*' and '**' mean. Could somebody let me know? > > This is a python thing. '*' means that any number of arguments can be > passed as a tuple. > > For instance, I have function: > > def add(a,b): > return a+b > > I could call this with a tuple argument: > > var = (4,5) > add(*var) > > '**' means any number of keyword arguments (dict) could be passed: > > def add(a=1,b=1): > return a+b > > I could call this with keywords by: > > var = {'a': 4, 'b':5} > add(**var)
Are '*' and '**' described somewhere in python's documentation? Would you please let me know where they are? Thank you! ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list