]> granicus.if.org Git - python/commitdiff
Update copyright dates.
authorGreg Ward <gward@python.net>
Sun, 15 Jun 2003 15:37:18 +0000 (15:37 +0000)
committerGreg Ward <gward@python.net>
Sun, 15 Jun 2003 15:37:18 +0000 (15:37 +0000)
Define True and False (if necessary) so this module can be copied as-is
to other projects (eg. Optik, Docutils) that don't depend on Python 2.3.

Lib/textwrap.py

index 76ac95326f668564d84ce5d70423c75f08db55a8..a4a549848f3dee6de3458497b0e9cc07a8cfa157 100644 (file)
@@ -2,13 +2,21 @@
 """
 
 # Copyright (C) 1999-2001 Gregory P. Ward.
-# Copyright (C) 2002 Python Software Foundation.
+# Copyright (C) 2002, 2003 Python Software Foundation.
 # Written by Greg Ward <gward@python.net>
 
 __revision__ = "$Id$"
 
 import string, re
 
+# Do the right thing with boolean values for all known Python versions
+# (so this module can be copied to projects that don't depend on Python
+# 2.3, e.g. Optik and Docutils).
+try:
+    True, False
+except NameError:
+    (True, False) = (1, 0)
+
 __all__ = ['TextWrapper', 'wrap', 'fill']
 
 # Hardcode the recognized whitespace characters to the US-ASCII