On Jul 15, 9:53 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On 15 juil, 01:24, [EMAIL PROTECTED] wrote:
>
> > Greetings.
>
> > I am looking for a way to achieve method behavior for a class I
> > created. That is, it has a __call__ method, so can be called like a
> > function. But I also w
On 15 juil, 01:24, [EMAIL PROTECTED] wrote:
> Greetings.
>
> I am looking for a way to achieve method behavior for a class I
> created. That is, it has a __call__ method, so can be called like a
> function. But I also want it to be treated as a method when it appears
> in a class body.
You need t
On Jul 14, 9:04 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Greetings.
>
> > I am looking for a way to achieve method behavior for a class I
> > created. That is, it has a __call__ method, so can be called like a
> > function. But I also want it to be treated as a met
[EMAIL PROTECTED] wrote:
Greetings.
I am looking for a way to achieve method behavior for a class I
created. That is, it has a __call__ method, so can be called like a
function. But I also want it to be treated as a method when it appears
in a class body.
Eg.
class foo:
def __call__(self,
Greetings.
I am looking for a way to achieve method behavior for a class I
created. That is, it has a __call__ method, so can be called like a
function. But I also want it to be treated as a method when it appears
in a class body.
Eg.
class foo:
def __call__(self, inst): pass
class bar: