homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ats.engg, docs@python, eric.araujo, ezio.melotti, rhettinger, terry.reedy
Date 2011年07月25日.09:24:01
SpamBayes Score 8.7175505e-07
Marked as misclassified No
Message-id <1311585842.84.0.744115664332.issue12634@psf.upfronthosting.co.za>
In-reply-to
Content
Indeed that paragraph is not really clear. I had to read it till the end ("verbs for methods and nouns for data attributes") to figure out what it was talking about. Even then it's still not clear what it's trying to say.
I *think* it means that if you have a class Foo with a method bar, and you do Foo.bar = 'data', the method will be overridden (so you won't be able to do Foo.bar for the 'data' and Foo.bar() for the method), but the opposite is also true.
Moreover I find both the suggestions for avoiding conflicts (capitalizing method names and/or using an underscore) wrong (both against PEP8). Also it never happened to me to have an attribute with the same name of a method, and I think in general it's not a common case (becase, as the paragraph says, methods are verbs and attributes nouns).
The whole thing could be rewritten to just say that an attribute name always refers to a single object, either to a method or to some "data".
History
Date User Action Args
2011年07月25日 09:24:02ezio.melottisetrecipients: + ezio.melotti, rhettinger, terry.reedy, eric.araujo, docs@python, ats.engg
2011年07月25日 09:24:02ezio.melottisetmessageid: <1311585842.84.0.744115664332.issue12634@psf.upfronthosting.co.za>
2011年07月25日 09:24:02ezio.melottilinkissue12634 messages
2011年07月25日 09:24:01ezio.melotticreate

AltStyle によって変換されたページ (->オリジナル) /