Adherir al PEP 8 -- Style Guide for Python Code

Bug #741301 reported by Emilien Klein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ColombiaCasa.com
In Progress
Low
Emilien Klein

Bug Description

ColombiaCasa.com's code should respect the Style Guide for Python Code: http://www.python.org/dev/peps/pep-0008/

This can be done in various stages. A non-exhaustive list of points to respect:
- Maximum Line Length (Limit all lines to a maximum of 79 characters.)
- Don't use spaces around the '=' sign when used to indicate a keyword argument or a default parameter value.
- Good documentation strings (a.k.a. "docstrings")
- Naming Conventions, particularly Function Names and Method Names and Instance Variables
- When catching exceptions, mention specific exceptions whenever possible instead of using a bare 'except:' clause.
- Don't compare boolean values to True or False using ==

Already done:
- Blank Lines
- Imports should usually be on separate lines
- Use ''.startswith() and ''.endswith() instead of string slicing to check for prefixes or suffixes.
- Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators.

Tags: code
Revision history for this message
Emilien Klein (emilien-klein) wrote :

Blank Line

Changed in colombiacasa:
assignee: nobody → Emilien Klein (emilien-klein)
status: New → In Progress
description: updated
Revision history for this message
Emilien Klein (emilien-klein) wrote :

r138: Imports should usually be on separate lines

description: updated
Revision history for this message
Emilien Klein (emilien-klein) wrote :

r144: Use ''.startswith() and ''.endswith() instead of string slicing to check for prefixes or suffixes.

description: updated
Revision history for this message
Emilien Klein (emilien-klein) wrote :

r145: Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators.

description: updated
Revision history for this message
Emilien Klein (emilien-klein) wrote :

r147: partial: scylla.py: When catching exceptions, mention specific exceptions whenever possible instead of using a bare 'except:' clause.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.