]> granicus.if.org Git - python/commitdiff
SF bug #131560: pdb imports 'repr', causing name collision
authorTim Peters <tim.peters@gmail.com>
Fri, 9 Feb 2001 23:28:07 +0000 (23:28 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 9 Feb 2001 23:28:07 +0000 (23:28 +0000)
Lib/pdb.py

index b8a8f5678c03473fede4db2c5925eaaad94514f5..1286f122ba0d3e523a090ad38ce7e547b721585b 100755 (executable)
@@ -8,7 +8,7 @@ import sys
 import linecache
 import cmd
 import bdb
-import repr
+from repr import repr as _saferepr
 import os
 import re
 
@@ -124,7 +124,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
         if type(exc_type) == type(''):
             exc_type_name = exc_type
         else: exc_type_name = exc_type.__name__
-        print exc_type_name + ':', repr.repr(exc_value)
+        print exc_type_name + ':', _saferepr(exc_value)
         self.interaction(frame, exc_traceback)
 
     # General interaction function