On Thu, 17 Oct 2013 11:46:52 +1100, Chris Angelico wrote: > On Thu, Oct 17, 2013 at 11:43 AM, MRAB <pyt...@mrabarnett.plus.com> > wrote: >> I'm guessing, but perhaps you need: >> >> instance = getattr(self, "%s" % key) > > How's that different from getattr(self,str(key))?
Are you blind man? The first one has a % symbol and the second one has two extra brackets. *wink* -- Steven -- https://mail.python.org/mailman/listinfo/python-list