Tuples -> Function Params?

Philip Swartzleonard starx at pacbell.net
Tue Dec 4 04:06:27 EST 2001


Duncan Booth || Tue 04 Dec 2001 12:57:16a:

> Philip Swartzleonard <starx at pacbell.net> wrote in
> news:Xns916D6505401FRASXnewsDFE1 at 130.133.1.4: 
>> a,b,c = self.color glColor3f(a,b,c) 
>> 
>>          Ok, the question is, is there a way to do this where i don't
>>          unpack  the tuple and pass sepearte arugments? 
> 
> Recent versions of Python:
>    glColor3f(*self.color)
> 
> For older versions, use the apply function.
> 

Thanks, both of you, that will mkae this more friendly i think :). Where 
can i go to read up on this * notation, i've only vaguely seen it before...

-- 
Philip Sw "Starweaver" [rasx] :: <nothing>



More information about the Python-list mailing list