Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41419 > unrolled thread

Re: "eval vs operator.methodcaller" - which is better?

Started byChris Angelico <rosuav@gmail.com>
First post2013-03-19 01:04 +1100
Last post2013-03-19 01:04 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "eval vs operator.methodcaller" - which is better? Chris Angelico <rosuav@gmail.com> - 2013-03-19 01:04 +1100

#41419 — Re: "eval vs operator.methodcaller" - which is better?

FromChris Angelico <rosuav@gmail.com>
Date2013-03-19 01:04 +1100
SubjectRe: "eval vs operator.methodcaller" - which is better?
Message-ID<mailman.3449.1363615498.2939.python-list@python.org>
On Tue, Mar 19, 2013 at 12:58 AM, Jean-Michel Pichavant
<jeanmichel@sequans.com> wrote:
> myFunc = getattr(myModule, methodName)

Doh! Thanks. I knew there was a shorter way of spelling it, rather
than digging with dunder methods. That's the way I would recommend -
slight tweak from the __getattribute__ version.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web