On 01 Mar 2005 10:30:01 GMT,
Nick Craig-Wood <[EMAIL PROTECTED]> wrote:

> However in python, there is no harm in accessing the attributes
> directly.  You can change the implementation whenever you like, and
> change the attributes into property()s and the users will never know.

[ ... ]

> Read only attributes are easy to understand, unlikely to go wrong and
> faster than getBlah() accessor methods.

> Writable attributes I think are good candidates for methods though.
> Looking inside an object is one thing but changing its internal state
> is another and should probably be done through a defined interface.

I wish I'd said it that well in the first place myself.  :-)

Regards,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
Îâ à Îâ à c = 1
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to