Hello,
I have a list of class instances. I wish to get the appropriate class attribute in each class instance depending on a SINGLE keyword in the calling class.
How do I get the calling method to correctly recognise the keyword as a keyword and not a class attribute? See example code below (which doesn't work).
class tocall:
def __init__(self):
self.title = "test"
self.name = "name"def callingmethod(self,**kw):
for key in kw:
if tocall.key == kw[key]:
return tocall.keywhich should work as such(but doesn't):
print callmethod(title = "test") print callmethod(name = "name")
Regards,
Guy -- http://mail.python.org/mailman/listinfo/python-list
