Lines Matching refs:thing

1484 def describe(thing):  argument
1486 if inspect.ismodule(thing):
1487 if thing.__name__ in sys.builtin_module_names:
1488 return 'built-in module ' + thing.__name__
1489 if hasattr(thing, '__path__'):
1490 return 'package ' + thing.__name__
1492 return 'module ' + thing.__name__
1493 if inspect.isbuiltin(thing):
1494 return 'built-in function ' + thing.__name__
1495 if inspect.isgetsetdescriptor(thing):
1497 thing.__objclass__.__module__, thing.__objclass__.__name__,
1498 thing.__name__)
1499 if inspect.ismemberdescriptor(thing):
1501 thing.__objclass__.__module__, thing.__objclass__.__name__,
1502 thing.__name__)
1503 if inspect.isclass(thing):
1504 return 'class ' + thing.__name__
1505 if inspect.isfunction(thing):
1506 return 'function ' + thing.__name__
1507 if inspect.ismethod(thing):
1508 return 'method ' + thing.__name__
1509 if type(thing) is types.InstanceType:
1510 return 'instance of ' + thing.__class__.__name__
1511 return type(thing).__name__
1540 def resolve(thing, forceload=0): argument
1542 if isinstance(thing, str):
1543 object = locate(thing, forceload)
1545 raise ImportError, 'no Python documentation found for %r' % thing
1546 return object, thing
1548 name = getattr(thing, '__name__', None)
1549 return thing, name if isinstance(name, str) else None
1551 def render_doc(thing, title='Python Library Documentation: %s', forceload=0): argument
1553 object, name = resolve(thing, forceload)
1576 def doc(thing, title='Python Library Documentation: %s', forceload=0): argument
1579 pager(render_doc(thing, title, forceload))
1583 def writedoc(thing, forceload=0): argument
1586 object, name = resolve(thing, forceload)