Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41419
| References | <CAFtnWG-8dndo6KYrmKvgsbiB5YkfBOgbPLrzHXauuOygvGbHtw@mail.gmail.com> <1282143233.6013541.1363615124749.JavaMail.root@sequans.com> |
|---|---|
| Date | 2013-03-19 01:04 +1100 |
| Subject | Re: "eval vs operator.methodcaller" - which is better? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3449.1363615498.2939.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: "eval vs operator.methodcaller" - which is better? Chris Angelico <rosuav@gmail.com> - 2013-03-19 01:04 +1100
csiph-web