Coding Style

Zope 3 Coding standards

The Zope 3 coding standards have been practiced since near the inception of the project. These standards have been written by Jim Fulton, the BDFL of Zope, and should be follow be anyone wishing to contribute to the Zope 3 core. In those cases where existing code follows a different style, the practice is to stay with that style.

CheckinGuidelines
Best Practice to follow when making checkins to the Subversion repository. Not really a coding style issue, but this seems to be a good place to link to it.
General Python Style
The "Python Style Guide", http://www.python.org/peps/pep-0008.html, including the admonition to use judgement when applying the Python style guide. ;) There are also some "local preferences" documented in ZopePythonStyleGuide.
ZCMLStyleGuide
Describes the preferred formatting of zcml files, although the same principle of using judgement when applying it applies, as well as some notes about file naming conventions.
ZopePythonNamingConventions
Describes the conventions for naming things in Python code.
FolderHierarchy?
Describes some rules on how to place new components and functionality into the Zope directory hierarchy.
FileStructure
Describes what a file should contain as header.
InterfaceStyle
Describes some basics about how an interface should be set up and used.
ClassesAttributesMethods
Describes how to name classes, methods and properties.
WritingUnitTests
Describes conventions and best practices for writing unit tests for modules.
NamesKeysAndIds
Helps you to decide when a thing is a name or an id, and when either one plays the role of a key.
TodoComments
Describes the conventions for specifying special to-do comments (e.g. XXX, TODO, BBB).
ServicesAndEvents
Describes a common pattern when you have a service that has subobjects, and those subobjects need to subscribe to receive events.
PageTemplates?
Describes what type of style is appropriate. I don't know how much or how little that might be.
FormsInHTML
Describes how to lay out HTML forms so that they can be formatted using CSS.
CodeOptimization
Describes some general rules about things to avoid
CommonWords
A list of certain words that should have the same meaning throughout Zope.



( 101 subscribers )