##// END OF EJS Templates
fix small bug seen with f2py-generated modules
fperez -
Show More
@@ -6,7 +6,7 b' Uses syntax highlighting for presenting the various information elements.'
6 Similar in spirit to the inspect module, but all calls take a name argument to
6 Similar in spirit to the inspect module, but all calls take a name argument to
7 reference the name under which an object is being read.
7 reference the name under which an object is being read.
8
8
9 $Id: OInspect.py 2723 2007-09-07 07:44:16Z fperez $
9 $Id: OInspect.py 2843 2007-10-15 21:22:32Z fperez $
10 """
10 """
11
11
12 #*****************************************************************************
12 #*****************************************************************************
@@ -473,7 +473,12 b' class Inspector:'
473 # most cases they will, but it's nice to print all the info for
473 # most cases they will, but it's nice to print all the info for
474 # objects which use instance-customized docstrings.
474 # objects which use instance-customized docstrings.
475 if ds:
475 if ds:
476 class_ds = getdoc(obj.__class__)
476 try:
477 cls = getattr(obj,'__class__')
478 except:
479 class_ds = None
480 else:
481 class_ds = getdoc(cls)
477 # Skip Python's auto-generated docstrings
482 # Skip Python's auto-generated docstrings
478 if class_ds and \
483 if class_ds and \
479 (class_ds.startswith('function(code, globals[,') or \
484 (class_ds.startswith('function(code, globals[,') or \
@@ -1,3 +1,9 b''
1 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
2
3 * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise
4 when querying objects with no __class__ attribute (such as
5 f2py-generated modules).
6
1 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
7 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
2
8
3 * IPython/Magic.py (magic_time): track compilation time and report
9 * IPython/Magic.py (magic_time): track compilation time and report
General Comments 0
You need to be logged in to leave comments. Login now