Python vs C for a mail server

Fredrik Lundh fredrik at pythonware.com
Sun Jan 29 17:40:09 EST 2006


Paul Boddie wrote:

> > I don't think I've ever seen anyone advocating calling a function like
> > getattr(obj "foo" + "bar")().
>
> >From Lib/compiler/visitor.py:
>
> meth = getattr(self.visitor, 'visit' + className, 0)
>
> Later on:
>
> meth(node, *args)
>
> Of course, you can drop the "visit" prefix and make the mechanism more
> predictable, but a search on the standard library for getattr produces
> a lot of evidence against your assertion.

if you read Jay's assertion in context, your "refutation" strikes me as
somewhat silly.

</F>






More information about the Python-list mailing list