IRC の #PEAR (Previous) (Next) 制御構造

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

第 3 章 標準コーディング規約

注意 PEAR 標準コーディング規約は、 PEAR の公式ディストリビューションに含まれるコードに適用されます。 コーディング規約 (Coding standards) は、開発者たちの間ではよく CS と略されます。この規約の狙いは、コードの一貫性を保つことと PEAR の開発者たちがコードを保守しやすくすることにあります。

IRC の #PEAR (Previous) (Next) 制御構造

Download Documentation Last updated: Sun, 31 Aug 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.