Re: mapping a string to an instancemethod

2008-08-01 Thread [EMAIL PROTECTED]
On Aug 1, 11:22 am, [EMAIL PROTECTED] wrote: > The following bit of code will allow an instance member to > be called by reference. How can I map a string (e.g. > "hello1" or "Foo.hello1" to a the instance member? > > class Foo: > def hello1(self, p): > print 'hello1', p > def hell

Re: mapping a string to an instancemethod

2008-08-01 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > The following bit of code will allow an instance member to > be called by reference. How can I map a string (e.g. > "hello1" or "Foo.hello1" to a the instance member? > > class Foo: > def hello1(self, p): > print 'hello1', p

mapping a string to an instancemethod

2008-08-01 Thread mh
The following bit of code will allow an instance member to be called by reference. How can I map a string (e.g. "hello1" or "Foo.hello1" to a the instance member? class Foo: def hello1(self, p): print 'hello1', p def hello2(self, p): print 'hello2', p def dispatch(self