At Monday 28/8/2006 14:55, shawn bright wrote:
would it be better to move all the functions i want to share into
some class and have the class threads refer to them that way ? i
mean, just to keep things seperate, but resuseable ?
That really depends on your design. Python does not enforce th
At Saturday 26/8/2006 06:13, nephish wrote:
i have an app that runs three classes as threads in the same program.
some of them need to be able to share some functions. Can i set a
function before i define a class and have the class use it ? Kinda like
this.
def some_function(var1, var2):
do
[EMAIL PROTECTED] wrote:
> nephish:
> > one more question.
> > the functions defined above the classes that the could be called from
> > within the classes, they do not need a 'self' declaration because they
> > are not part of a class, right?
>
> Class methods generally require the self as first
nephish:
> one more question.
> the functions defined above the classes that the could be called from
> within the classes, they do not need a 'self' declaration because they
> are not part of a class, right?
Class methods generally require the self as first parameter, functions
don't need the sel
nephish wrote:
> [EMAIL PROTECTED] wrote:
> > nephish:
> > > is this legal ? is it pythonic?
> >
> > It's legan and pythonic. Functions are here for a purpose.
> >
> > Bye,
> > bearophile
>
> cool enough, and thanks for the quick reply.
>
> shawn
one more question.
the functions defined above the
[EMAIL PROTECTED] wrote:
> nephish:
> > is this legal ? is it pythonic?
>
> It's legan and pythonic. Functions are here for a purpose.
>
> Bye,
> bearophile
cool enough, and thanks for the quick reply.
shawn
--
http://mail.python.org/mailman/listinfo/python-list
nephish:
> is this legal ? is it pythonic?
It's legan and pythonic. Functions are here for a purpose.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
lo there all,
i have an app that runs three classes as threads in the same program.
some of them need to be able to share some functions. Can i set a
function before i define a class and have the class use it ? Kinda like
this.
def some_function(var1, var2):
do something with var1, var2
r