Hello, learning pyGTK slowly. 

I am following an article about creating a widget and I'm a little stuck on 
this code:
1. def do_get_property(self, property):
2.  if property.name in self.__gproperties__:
3.     return getattr(self, property.name)

Why, in line 3, do they choose to use getattr? How does it differ from just 
using "return self.property.name"?

/d
-- 
"Life results from the non-random survival of randomly varying replicators."
-- Richard Dawkins

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to