method names nounVerb or verbNoun

cjw cjw at ncf.ca
Thu Feb 11 10:24:00 EST 2010


On 05-Feb-10 14:53 PM, Wanderer wrote:
> Which is the more accepted way to compose method names nounVerb or
> verbNoun?
>
> For example voltageGet or getVoltage? getVoltage sounds more normal,
> but voltageGet is more like voltage.Get. I seem to mix them and I
> should probably pick one way and stick with it.
>
> Thanks
I prefer verbNoun.  Let's remember that PEP 8 is a guide, not a set of 
rules.

Colin W.



More information about the Python-list mailing list