Index: Lib/pdb.py =================================================================== --- Lib/pdb.py (revision 85046) +++ Lib/pdb.py (working copy) @@ -1275,7 +1275,7 @@ (Pdb) global list_options; list_options = ['-l'] (Pdb) """ - self.message(self.help_exec.__doc__.strip()) + self.message((self.help_exec.__doc__ or '').strip()) def help_pdb(self): help() @@ -1343,10 +1343,13 @@ 'debug', 'quit', ] +if __doc__ is None: + __doc__ = '' + docs = set() for _command in _help_order: - __doc__ += getattr(Pdb, 'do_' + _command).__doc__.strip() + '\n\n' -__doc__ += Pdb.help_exec.__doc__ + __doc__ += (getattr(Pdb, 'do_' + _command).__doc__ or '').strip() + '\n\n' +__doc__ += (Pdb.help_exec.__doc__ or '') del _help_order, _command