MCPcopy Index your code
hub / github.com/python/cpython / classlink

Method classlink

Lib/pydoc.py:682–688  ·  view source on GitHub ↗

Make a link for a class.

(self, object, modname)

Source from the content-addressed store, hash-verified

680 return name
681
682 def classlink(self, object, modname):
683 """Make a link for a class."""
684 name, module = object.__name__, sys.modules.get(object.__module__)
685 if hasattr(module, name) and getattr(module, name) is object:
686 return '<a href="%s.html#%s">%s</a>' % (
687 module.__name__, name, classname(object, modname))
688 return classname(object, modname)
689
690 def parentlink(self, object, modname):
691 """Make a link for the enclosing class or module."""

Callers 3

formattreeMethod · 0.95
docclassMethod · 0.95
docroutineMethod · 0.95

Calls 2

classnameFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected