[Python-Dev] PEP 8 updates/clarifications
Barry Warsaw
barry at python.org
Mon Dec 12 19:25:11 CET 2005
On Sun, 2005-12-11 at 16:30 -0600, Ian Bicking wrote:
> Potentially it could be added that the whole issue can often be avoided
> when an object's methods perform actions instead of returning attributes
> of the object. It's a long topic; maybe it could even just be a link,
> if someone knows of a good discussion along those lines. I'm sure
> there's some terminology here that I'm forgetting that describes the
> design pattern. There's also a point when the style guide becomes an
> API design guide, and I don't know how far it should go in that direction.
I'm not exactly sure if this is what you're getting at, but one thing
that bothers me is using data attributes to trigger actions. Maybe this
gets into the "no side-effects" rule for data attributes, but attributes
that cause an object to perform some action should always be explicit
methods.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20051212/56be9cc0/attachment-0001.pgp
More information about the Python-Dev
mailing list