From dd0a1b4d99fbd20a7503b1592fe84aca2bb1ceac 2010-09-03 08:28:30 From: Fernando Perez Date: 2010-09-03 08:28:30 Subject: [PATCH] Fix bug with unicode formatting of definition lines. --- diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index 463d0f4..7e7d55c 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -207,7 +207,9 @@ class Inspector: exception is suppressed.""" try: - return oname + inspect.formatargspec(*getargspec(obj)) + # We need a plain string here, NOT unicode! + hdef = oname + inspect.formatargspec(*getargspec(obj)) + return hdef.encode('ascii') except: return None