Iñaki García Etxebarria schrieb:
But IMO the main question is whether it is really advantageously to map the properties to attributes.

I think so, it produces readable code, and many times is very natural. And, to me at least, the design of the properties api in gobject is thought with this kind of purposes in mind.


I totally agree that the code becomes more readable and even more beautiful.


I am by no means an expert of OOP but what I read is that public data members in the long run tend to be unflexible.
Thus you typically provide a pair of accessors like set_value, get_value (set_property/get_property).


But probably my view is not pythonesque (?) enough.
Eventually, these attributes only look like public data members and what happens internally if they are accessed is still under control.


Jan


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

Reply via email to