You can always write a one line function that calls your method.
Jug does well in an object-based style, but it's not designed for
old-school OOP.
Luis
--
Luis Pedro Coelho | EMBL |
http://luispedro.org
My blog:
http://metarabbit.wordpress.com
On Wed, 6 Jul 2016, at 11:00 PM,
bank...@math.tu-berlin.de wrote:
> I've been writing my whole code object-oriented so far. The actual task
> that's paralelizable happens after lots of initializations. Having a
> regular function is not that 'simple', I need a whole copy of my
> workspace.
> I don't want to mess up my structure by using global variables or
> similar.
>
>
> On Wednesday, July 6, 2016 at 3:59:23 PM UTC-4, luispedro wrote:
> >
> > My impression of that you are trying is an unsupported use. Why not simply
> > have a regular function?
> >
> > Luis
> >
> > On July 6, 2016 8:14:00 PM GMT+02:00,
bank...@math.tu-berlin.de
> > <javascript:> wrote:
> >>
> >> Hi,
> >>
> >> I'd like to use jug inside a class, i.e., tasks are created inside a
> >> __call__ method of a class. However, running jug fails with the error, that
> >> __call__ needs 2 arguments, but only one is provided. This function runs
> >> perfectly fine, when its not decorated with @TaskGenerator, so somehow
> >> 'self' is not being passed to the function.
> >>
> >> Currently I am using a dirty hack, so please add support for class
> >> methods.
> >>
> >>
> > --
> > Luis Pedro Coelho
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "jug-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
jug-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.