On 12/14/05, Wolfgang <[EMAIL PROTECTED]> wrote: > 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".
Actually this (function, method and ivar names) is such a contentious issue that I think the style guide should explicitly allow all two/three styles and recommend to be consistent within a class, module or package. I want to be adamant about module, package and class names though: module/package names should be short all-lowercase without underscores; class names should be CapWords. I'd like to fix this for StringIO.py, UserDict.py etc. > The use of lowercase with underscores is the default so > the python std lib should use it in all modules. Too late. I don't think the diversity is all that distracting. I'd be much more concerned about spelling MethodNames (as unfortunately the Google style guide requires). -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com