Follow the standard Python formatting rules when writing code for Sage,
as explained at http://www.python.org/doc/essays/styleguide.html.
In particular,
- Use 4 spaces for indentation levels. Do not use tabs as they
can result in indentation confusion. Most editors have a feature
that will insert 4 spaces when the tab key is hit. Also, many
editors will automatically search/replace leading tabs with 4
spaces.
- Usually use all lowercase function names with words separated by underscores:
instead of:
- Use CamelCase for class names and major functions that create
objects, e.g.,
PolynomialRing
.
Release 2008.07.11, documentation updated on July 11, 2008.
See About this document... for information on suggesting changes.