From 1bd889d78c9b8dcf7b156469b243fa0580616b1f Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 14 Dec 2005 22:54:57 +0000 Subject: [PATCH] Fixed a couple of small tyops. --- pep-0008.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pep-0008.txt b/pep-0008.txt index 750fcc629..6c600c8ce 100644 --- a/pep-0008.txt +++ b/pep-0008.txt @@ -459,7 +459,7 @@ Naming Conventions - __double_leading_and_trailing_underscore__: "magic" objects or attributes that live in user-controlled namespaces. E.g. __init__, - __import__ or __file__. Never invent such names; only use then + __import__ or __file__. Never invent such names; only use them as documented. Prescriptive: Naming Conventions @@ -487,7 +487,7 @@ Naming Conventions module that provides a higher level (e.g. more object oriented) interface, the C/C++ module has a leading underscore (e.g. _socket). - Like module, Python packages should have short, all-lowercase names, + Like modules, Python packages should have short, all-lowercase names, without underscores. Class Names @@ -727,7 +727,9 @@ Programming Recommendations - Don't compare boolean values to True or False using == Yes: if greeting: + No: if greeting == True: + Worse: if greeting is True: @@ -746,7 +748,7 @@ References [6] PEP 20, The Zen of Python - [7] PEP 328, Imports: Multi-Line and Absolute/Relative + [7] PEP 328, Imports: Multi-Line and Absolute/Relative Copyright