[Python-Dev] PEP 8 updates/clarifications, function/method style

Wolfgang wl at flexis.de
Wed Dec 14 16:12:20 CET 2005


Hello,

PEP 8 for function and method names:
-----
Function Names

       Function names should be lowercase, possibly with words separated by
       underscores to improve readability.  mixedCase is allowed only in
       contexts where that's already the prevailing style (e.g. threading.py),
       to retain backwards compatibility.

Method Names and Instance Variables

       The story is largely the same as with functions: in general, use
       lowercase with words separated by underscores as necessary to improve
       readability.
-----

We need a clear style for function and method names
now std lib uses "foo_bar" sometimes "foobar"
and sometimes "fooBar".

The use of lowercase with underscores is the default so
the python std lib should use it in all modules.
-> Python 3000 std lib


Or should we switch to camelCase with lowercase first letter ?
As most other Languages prefer this (Java, C#, C++, ...)


bye by Wolfgang



More information about the Python-Dev mailing list