[Python-Dev] PEP 8 updates/clarifications
Phillip J. Eby
pje at telecommunity.com
Tue Dec 13 17:43:10 CET 2005
At 07:26 AM 12/13/2005 -0500, Jim Fulton wrote:
>Personally, I'd actively discourage use of trivial accessors. Simple
>attribute access is not only "fine", IMO, but it is much better than
>trivial accessors. This is an important point, IMO, because, in my
>experience, the vast majority of accessors *are* trivial.
+1000. Python is not Java. It's hard enough to get former Java users to
stop writing getters and setters in the first place, without PEP 8
providing even a sliver of support for that nonsense. If anything, PEP 8
should warn in the strongest possible terms about the wastefulness of this
practice and its detrimental effects on code size, readability, and
performance.
More information about the Python-Dev
mailing list