On Thursday 05 June 2008 12:31:56 you wrote:
> On Jun 5, 2008, at 6:06 PM, Andreas Kostyrka wrote:
> > well, don't return a string :-P
> >
> > class CallableString(str):
> > def __call__(self, *args, **kw):
> > return self
> >
> > And now instead of return '', write return CallableString('')
>
> Whoa, trippy.
>
> That certainly works, but it's a workaround to the original question –
> is there actually any way to 'detect' an attribute/method call?No, because there are no "method calls" in Python. obj.method() means: locate obj in locals/globals. locate method on obj call the found thing. obj => obj.method => obj.method() Andreas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
