It works well for me.  Its just a snippet i grabed from my class O_o.

On 9/10/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
>
> Lamonte Harris wrote:
> > I came up w/ this for my class:
> >     def hex_converter(self,hexcolorcode):
> >         hexcolorcode = hexcolorcode[1:]
> >         red = hexcolorcode[0:2]
> >         red = int(red,16)
> >         blue = hexcolorcode[2:4]
> >         blue = int(blue,16)
> >         green = hexcolorcode[4:6]
> >         green = int(green,16)
> >         return (red,green,blue)
> >
> > Thanks. again
> Sure.  Are you sure you're using your classes right, though?  A method
> of a class should change instance attributes, and only secondly return
> values.  That shouldn't be its primary focus.
> If you have more questions that are python-specific but not
> pygame-specific, try asking on the python-tutor mailing list.  It's a
> nice list geared specifically toward people learning Python.
> -Luke
>

Reply via email to