On Thu, Jul 30, 2009 at 3:04 PM, srinivasan srinivas < sri_anna...@yahoo.co.in> wrote:
> Hi, > I would like to know if i have an object and one of its methods as a > string. How to call the method using this string? > For ex > If object is x and string y has one of its method names. > x.value(y)() ---. Is there a way to do this? > > Thanks, > Srini getattr(x,y)() > > > > See the Web's breaking stories, chosen by people like you. Check out > Yahoo! Buzz. http://in.buzz.yahoo.com/ > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list