On Tue, 6 Jun 2000, Greg Wilson wrote:
Tim Peters: http://www.python.org/doc/essays/styleguide.html
On Tue, 6 Jun 2000, Christopher Petrilli wrote: The only thing that might be added (I haven't looked in a while, but didn't see it last time I did), is some naming convention issues. I follow pretty standard Smalltalk guidelines:
- No '_', use camelCase for seps
I know this is become common practice, but I've been told by two different HCI specialists that studies have shown CamelBackNotation to be harder for non-native speakers to read than underbar_separated_text, particularly when acronyms are part of the name. If anyone has a pointer to an original reference for this, I'd be grateful.
Actually, the "camel case" for identifiers is not a standard Python style. I've seen three forms: - no separator or case usage (e.g. getattr()) - mixed case - lower case with underscores Chris' other points: upper-case-initial classes and lower-case-initial methods are *definitely* standard. Globals are a bit different. I don't think it is standard to capitalize them as Chris mentioned (they might look like classes in that case). There isn't much of a standard there. Definitely another point is the use of "_" for the initial character to signify "private -- don't touch" Cheers, -g -- Greg Stein, http://www.lyra.org/