#PEAR im IRC (Previous) (Next) Kontrollstrukturen

View this page in Last updated: Sun, 20 Jul 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Kapitel 3. Coding Standards

Anmerkung: Die PEAR Codings Standards gelten für Quellcode der Bestandteil der offiziellen PEAR-Distribution ist. Die Codings Standards werden meist kurz als CS bezeichnet. Ihr Ziel ist es, den Quellcode konsistent zu halten und somit es allen Beteiligten zu erleichtern den Quellcode zu lesen und zu betreuen.

#PEAR im IRC (Previous) (Next) Kontrollstrukturen

Download Documentation Last updated: Sun, 20 Jul 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: v1d4l0k4@gmail.com
From the PEP 8 -- Style Guide for Python Code about maximum line length:

"Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to have
several windows side-by-side. The default wrapping on such devices
disrupts the visual structure of the code, making it more difficult to
understand. Therefore, please limit all lines to a maximum of 79
characters. For flowing long blocks of text (docstrings or comments),
limiting the length to 72 characters is recommended."

IMHO, it's a good choice.
Note by: akronymn
The suggestion on line lengths is only partly due to terminal considerations. Readability of code is also a very important issue. It's not about setting a precise limit for the sake of consistency so much as giving a guideline to make sure that your code is easily readable both by yourself and others who must follow it later.
Note by: SnowDrummer
That's a silly note to add. 75-85 is ~80 characters for that very reason (standard terminal width). If you only go a couple characters over there is no reason to split your code into two lines.
Note by: thomas@apestaart.org
If you're limiting 75-85 chars, why not just limit to 80 chars ? There's no point pissing off the people that still respect the most common terminal width.