Commit Graph

31 Commits

Author SHA1 Message Date
Barry Warsaw 9d3a63d38d Remove a bunch of Emacs references. They're unnecessary for making the point. 2005-12-15 15:44:35 +00:00
Barry Warsaw 1bd889d78c Fixed a couple of small tyops. 2005-12-14 22:54:57 +00:00
Guido van Rossum b7714412f7 Some additional tweakage, hopefully non-controversial. 2005-12-14 22:10:16 +00:00
Barry Warsaw 478d6d498e After lengthy discussion on python-dev, here is an update to the Python style
guide.  Hopefully it has been simplified and made more prescriptive, as well
as improved by all the great community suggestions.
2005-12-14 21:12:58 +00:00
David Goodger 7b245bb06d fixed raise syntax examples; closing http://python.org/sf/1264666 2005-08-20 13:48:50 +00:00
Andrew M. Kuchling ac8c835cce Record BDFL opinion on exception-raising style 2005-08-07 13:27:54 +00:00
Raymond Hettinger dec5ab7a7c SF patch #980695: efficient string concatenation
(Original patch by Armin Rigo).
2004-08-06 18:47:26 +00:00
Kurt B. Kaiser 9c67b23e5a Clarifications resulting from further discussion with Barry Warsaw. 2004-03-30 01:12:22 +00:00
Barry Warsaw e13d881fb8 updated a link 2004-03-27 20:37:02 +00:00
Barry Warsaw bae8037025 A few more minor updates for the Naming Conventions section:
- recommend that all new libraries use the standards, but point out that
  internal consistency with existing standards is more important.

- Use b and B instead of x and X (it's hard to distinguish the case of X in
  some fonts)

- StudlyCaps is another name for CapWords

- Re-order list so Function Names are followed by Method Names.  Also, added a
  few blank lines in the Method Names section, and described how underscores
  should separate words for readability.

- Added that double leading underscore is usually only necessary to resolve
  name conflicts in subclasses.
2004-03-27 20:14:19 +00:00
Kurt B. Kaiser fef61c2a39 Patch 919256
Clarify and standardize the format for names of modules, functions,
methods, and instance variables.

Consistent, I hope, with discussion on python-dev

http://mail.python.org/pipermail/python-dev/2004-March/043257.html

http://mail.python.org/pipermail/python-dev/2004-March/043259.html
2004-03-20 06:42:29 +00:00
Raymond Hettinger a37771e3cb * str.startwith() is less errorprone that slice comparisons but not as fast.
* Fix minor typos.
2003-09-27 02:53:59 +00:00
Barry Warsaw 99ab3d4e0c Setting my address back to barry@python.org for consistency and better
spam fighting defenses.
2003-09-22 04:51:50 +00:00
Barry Warsaw 8e4c8019b1 Added a note on compound statements after remarks from David Goodger.
Make the code samples agree with this recommendation. ;)
2002-10-17 15:32:18 +00:00
Guido van Rossum 36a82afee6 Add ruling about source code encodings. 2002-10-07 13:40:41 +00:00
Fred Drake d5b900cf13 Fix a couple of import statements. 2002-06-22 02:14:49 +00:00
Guido van Rossum 6655f152be Don't use 'strorunicodeobj' as the generic object name. Use just
'obj' -- after all, you don't know that it's a string or unicode
object just yet, that's what the test in these examples is for!
2002-06-04 17:02:07 +00:00
Neal Norwitz 22cf1a49f9 Update for all the various ways of checking for a string/unicode object
in 2.3, 2.2, 2.1/2.0.
2002-06-04 16:57:44 +00:00
Barry Warsaw 842de4b458 Slight change to the string methods recommendation; we mitigate the
recommendation if compatibility with pre-Python 2.0 is necessary.
2002-05-29 16:07:27 +00:00
Guido van Rossum 78c759d636 Two tiny clarifications. 2002-05-24 19:46:20 +00:00
Andrew M. Kuchling 74d28aabb3 Typo fix 2002-05-24 19:42:30 +00:00
Barry Warsaw a086f6d04f More additions based on comments from Tim Peters, Neal Norwitz,
Gerhard Haring, and Guido van Rossum.
2002-05-24 19:39:47 +00:00
Barry Warsaw 7c91cd266a Added Tim's names to avoid (with the addition of cap-I which looks
like an `l' in some fonts).
2002-05-24 17:07:17 +00:00
Barry Warsaw d5a7731ccf Integrated style recommendations from my (Barry's) mimelib/Mailman
style guide.  Only added recommendations that Guido agrees with. :)
2002-05-24 16:22:16 +00:00
Guido van Rossum 7112960b46 Minor nits. Add strong preference for spaces over tabs. 2002-05-24 15:01:43 +00:00
Barry Warsaw bd48c56a75 Roger <roger.haase@usa.net> points out that "mixed case" is
inconsistently used both to describe mixedCase and MixedCase.
MixedCase should really be CapWords, reserving mixedCase for the
situation where the first letter is lowercased.

Also, add a comment that MixedCase is sometimes called CamelCase.
Note that the existing most common case usage is that CamelCase has an
initial capitalized letter.

http://www.wikipedia.com/wiki/CamelCase
2001-12-21 05:49:26 +00:00
Guido van Rossum 5b12f72b7d Apply Strunk & White. (Paul Flowerman.) 2001-11-01 13:03:30 +00:00
Barry Warsaw 295e210393 barry@digicool.com => barry@zope.com 2001-08-14 15:45:26 +00:00
Guido van Rossum 8bee56c3bf Make the section on consistency a separate section, as in the
original.  Close an unmatched parenthesis at the very end.
2001-07-05 20:38:11 +00:00
Barry Warsaw e3eaa92bcf Post it today. 2001-07-05 18:56:34 +00:00
Barry Warsaw 80caa6827f Guido's famous Python Style Guide essay, converted to PEP format,
spellchecked and mildly edited.  It's still as incomplete as the
former.
2001-07-05 18:56:12 +00:00