Base classes or global functions

Robb Shecter rs at onsitetech.com
Thu Jul 25 19:24:49 EDT 2002


Eric Texier wrote:
> In case of scenari #3, I like personnally the use of staticmethod
> 
> class utilHelper:
>     ''' some initialization code and variable can happen here when the module
>         is loaded
>     '''
>     def somefunction(params):
>        ....
> 
>     somefunction = staticmethod(somefunction)
> 

Hmmm... but first I feel like we have to know what the function is 
about.  It'd be easy to put all the functions into a Util class as 
static methods, but it may not be object oriented.  I'm wondering if 
these functions are part of an actual Class that has as yet not been 
'discovered' through analysis.




More information about the Python-list mailing list