Question about __getattribute__/__getattr__
holger krekel
pyth at devel.trillke.net
Mon Sep 30 15:53:27 EDT 2002
Joao Prado Maia wrote:
> On Mon, 30 Sep 2002, Mark McEahern wrote:
>
> > > if cached_value == None:
> >
> > This is an aside, but comparison to None should be via identity rather than
> > equality; e.g.,
> >
> > if x is None:
> >
> > or:
> >
> > if x is not None:
> >
>
> Yeah, I always forget that when switching from PHP to Python. Anyway, my
> main question was how to get the list of arguments passed to a
> method/function. Any ideas ? :)
Probably you are interested in the Memoize recipe at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52201
regards,
holger
More information about the Python-list
mailing list