On Fri, Feb 5, 2010 at 2:53 PM, Wanderer <wande...@dialup4less.com> 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
> --
> http://mail.python.org/mailman/listinfo/python-list
>

I'd say noun_verb (note the underscore in accordance with the style
guide in PEP 8):

http://www.python.org/dev/peps/pep-0008/

Function Names

      Function names should be lowercase, with words separated by underscores
      as necessary to improve readability.

      mixedCase is allowed only in contexts where that's already the
      prevailing style (e.g. threading.py), to retain backwards compatibility.

-- 
Gerald Britton
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to