[kforge-dev] Updating codebase to conform to recent changes in python style guide (PEP8)
Rufus Pollock
rufus.pollock at okfn.org
Wed May 31 09:52:36 UTC 2006
PEP8 (Style Guide for Python code) was updated 2006-03-23 in significant
ways. For our purposes the relevant alterations are:
1. "Modules [and packages] should have short, lowercase names, without
underscores."
* we are already following this to a large extent
* seems sensible though i would argue it is ok to permit
underscores for test modules e.g. module1 and module1_test. However it
does not matter much either way and the important point would be to have
consistency (currently there is some mix between module1test and
module1_test in the codebase)
2. "in relation to method and function naming: Function names should be
lowercase, with words separated by underscore 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."
* in the past it was up to you whether to use mixedCase or LCU
* we have used mixedCase
* having used this convention on other projects I find it
preferable to LCU and I think it is worth making the effort now to move
to what will be the future standard
What do people think?
Regards,
Rufus
More information about the kforge-dev
mailing list