Best place for a function?

Inyeol Lee inyeol.lee at siliconimage.com
Fri Mar 9 14:27:22 EST 2007


On Wed, Mar 07, 2007 at 05:27:04PM -0500, Sergio Correia wrote:
> I'm writing a class, where one of the methods is kinda complex. The
> method uses a function which I know for certain will not be used
> anywhere else. This function does not require anything from self, only
> the args passed by the method.
> 
> Where should I put the function?

Use staticmethod. It's a normal function with class namespace.

--Inyeol



More information about the Python-list mailing list