[Python-Dev] PEP 8 updates/clarifications

Phillip J. Eby pje at telecommunity.com
Mon Dec 12 20:01:34 CET 2005


At 11:35 AM 12/12/2005 -0600, skip at pobox.com wrote:
>     >> In my experience it's difficult to find the locations where another
>     >> module mucks with your object's state.  Using properties or accessor
>     >> methods coupling between modules is reduced and you can be more
>     >> confident that the only place an object's state is modified directly
>     >> is in its own code.
>
>     pje> So?
>
>So I'm saying I encounter it in practice and makes code harder to maintain.
>It's not a hypothetical problem for me.

I don't understand what part is the "problem".  Why do you care what other 
code does to your object's state?  If you need to maintain your own state 
when an attribute changes, change the attribute to a property.  Where's the 
"problem"?



More information about the Python-Dev mailing list