[Python-checkins] CVS: python/nondist/sandbox/help htmldoc.py,1.5,1.6 textdoc.py,1.3,1.4

Ka-Ping Yee ping@users.sourceforge.net
Wed, 17 Jan 2001 11:48:15 -0800


Update of /cvsroot/python/python/nondist/sandbox/help
In directory usw-pr-cvs1:/tmp/cvs-serv4927

Modified Files:
	htmldoc.py textdoc.py 
Log Message:
Check for existence of types.UnicodeType before using it.
Fix typo in htmldoc.py: reference to "file" should have been "arg".
Thanks to Tony J Ibbs.


Index: htmldoc.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/help/htmldoc.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** htmldoc.py	2001/01/14 22:18:44	1.5
--- htmldoc.py	2001/01/17 19:48:13	1.6
***************
*** 179,183 ****
      return type(object) in [
          types.FloatType, types.IntType, types.ListType, types.LongType,
!         types.StringType, types.TupleType, types.TypeType, types.UnicodeType]
  
  def document_module(object):
--- 179,184 ----
      return type(object) in [
          types.FloatType, types.IntType, types.ListType, types.LongType,
!         types.StringType, types.TupleType, types.TypeType,
!         hasattr(types, 'UnicodeType') and types.UnicodeType or 0]
  
  def document_module(object):
***************
*** 404,410 ****
                      modnames.append(file[:-9])
          else:
!             if arg[-3:] == '.py' and file[:-3] not in modnames:
                  modnames.append(arg[:-3])
!             elif arg[-4:] == '.pyc' and file[:-4] not in modnames:
                  modnames.append(arg[:-4])
              else:
--- 405,411 ----
                      modnames.append(file[:-9])
          else:
!             if arg[-3:] == '.py' and arg[:-3] not in modnames:
                  modnames.append(arg[:-3])
!             elif arg[-4:] == '.pyc' and arg[:-4] not in modnames:
                  modnames.append(arg[:-4])
              else:

Index: textdoc.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/help/textdoc.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** textdoc.py	2001/01/14 21:55:22	1.3
--- textdoc.py	2001/01/17 19:48:13	1.4
***************
*** 68,72 ****
      return type(object) in [
          types.FloatType, types.IntType, types.ListType, types.LongType,
!         types.StringType, types.TupleType, types.TypeType, types.UnicodeType]
  
  def document_module(object):
--- 68,73 ----
      return type(object) in [
          types.FloatType, types.IntType, types.ListType, types.LongType,
!         types.StringType, types.TupleType, types.TypeType,
!         hasattr(types, 'UnicodeType') and types.UnicodeType or 0]
  
  def document_module(object):