[Zope3-dev] RFC: Guide for maintaining software in the Zope repository

Zvezdan Petkovic zvezdan at zope.com
Sat Aug 25 18:12:02 EDT 2007

On Saturday 25 August 2007 09:48, Benji York wrote:
> Andreas Jung wrote:
> > Can someone please point out the major differences concerning
> > Python code between PEP 8 and the Zope 3 style guide?
> The primary differences are in method, attribute, function, and
> variable names.  PEP 8 specifies lower_case_with_underscores.
> Zope 3, more often than not (as noted by others, inconsistencies
> exists), follows these conventions:
> http://wiki.zope.org/zope3/ZopePythonNamingConventions specifies
> CamelCase for "Public global variables" (not exactly sure what all
> that encompasses) and lower_case_with_underscores for local
> variables.  The same page prescribes mixedCase for module-level
> (non-factory) functions.
> http://wiki.zope.org/zope3/ClassesAttributesMethods specifies
> mixedCase for attributes and methods.

FWIW, the Zope3 style guide on that wiki page states explicitly in the 
first paragraph that Python Style Guide is used for all issues that are 
not mentioned, and then continues to say that "most of the code" in 
Zope 3 so far uses CamelCase instead of names_as_this.

The way I read this, it's "most of the code so far uses", rather than
"all code must/should use".  It's a *description* of the current state
rather than the *prescription* to do it in CamelCase.
Perhaps the intent to prescribe should have been stated explicitly,
but currently it isn't, it's only nudged towards a new user.

I also think this is the least worthy of style issues to pursue because 
it affects the reader's visual perception.  All of us have different 
visual perceptions, some of us have bad eyes or some other reason to 
find one easier to read than other.  Please see my other message in 
this thread on this.

+1 for Benji's preference of PEP-8.

Best regards,
Zvezdan Petkovic

More information about the Zope3-dev mailing list