Re: Simple question on Parameters...

2005-12-29 Thread Fredrik Lundh
Hans Nowak wrote: > You don't have to use fillColor[0], you can use tuple unpacking to name > the elements of the tuple. E.g. > > def renderABezierPath(self, path, closePath=True, outlineColor=(1.0, > 1.0, 1.0, 1.0), fillColor=(0.0, 0.0, 0.0, 0.25)): > r, g, b, a = outlineColor > fr, fg

Re: Simple question on Parameters...

2005-12-28 Thread Will McGugan
KraftDiner wrote: > I guess its all good... > I just am not crazy about using fillColor[0] id rather use fillColor.r > So is that a structure I need to define or a class... > I'm kind of new to python what would that class or structure look like? > and then do the default parameters still work? T

Re: Simple question on Parameters...

2005-12-28 Thread KraftDiner
NICE! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple question on Parameters...

2005-12-28 Thread Hans Nowak
KraftDiner wrote: > I guess its all good... > I just am not crazy about using fillColor[0] id rather use fillColor.r You don't have to use fillColor[0], you can use tuple unpacking to name the elements of the tuple. E.g. def renderABezierPath(self, path, closePath=True, outlineColor=(1.0, 1.0

Re: Simple question on Parameters...

2005-12-28 Thread KraftDiner
I guess its all good... I just am not crazy about using fillColor[0] id rather use fillColor.r So is that a structure I need to define or a class... I'm kind of new to python what would that class or structure look like? and then do the default parameters still work? -- http://mail.python.org/ma

Re: Simple question on Parameters...

2005-12-28 Thread Will McGugan
KraftDiner wrote: > I have defined a method as follows: > > def renderABezierPath(self, path, closePath=True, r=1.0, g=1.0, b=1.0, > a=1.0, fr=0.0, fg=0.0, fb=0.0, fa=.25): > > Now wouldn't it be simpler if it was: > > def renderABezierPath(self, path, closePath=True, outlineColor, > fillColor):

Re: Simple question on Parameters...

2005-12-28 Thread Lawrence Oluyede
Il 2005-12-28, KraftDiner <[EMAIL PROTECTED]> ha scritto: > I have defined a method as follows: > > def renderABezierPath(self, path, closePath=True, r=1.0, g=1.0, b=1.0, > a=1.0, fr=0.0, fg=0.0, fb=0.0, fa=.25): > > Now wouldn't it be simpler if it was: > > def renderABezierPath(self, path, closeP

Re: Simple question on Parameters...

2005-12-28 Thread Jean-Paul Calderone
On 28 Dec 2005 12:37:32 -0800, KraftDiner <[EMAIL PROTECTED]> wrote: >I have defined a method as follows: > >def renderABezierPath(self, path, closePath=True, r=1.0, g=1.0, b=1.0, >a=1.0, fr=0.0, fg=0.0, fb=0.0, fa=.25): > >Now wouldn't it be simpler if it was: > >def renderABezierPath(self, path,

Simple question on Parameters...

2005-12-28 Thread KraftDiner
I have defined a method as follows: def renderABezierPath(self, path, closePath=True, r=1.0, g=1.0, b=1.0, a=1.0, fr=0.0, fg=0.0, fb=0.0, fa=.25): Now wouldn't it be simpler if it was: def renderABezierPath(self, path, closePath=True, outlineColor, fillColor): But how do you set default vaules