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

Method _get_version

Lib/pydoc.py:525–532  ·  view source on GitHub ↗
(self, object)

Source from the content-addressed store, hash-verified

523 return docloc
524
525 def _get_version(self, object):
526 if self._is_stdlib_module(object):
527 with warnings.catch_warnings():
528 warnings.simplefilter("ignore", DeprecationWarning)
529 version = getattr(object, '__version__', None)
530 else:
531 version = getattr(object, '__version__', None)
532 return '' if version is None else str(version)
533
534 def _is_stdlib_module(self, object, basedir=None):
535 basedir = self.STDLIB_DIR if basedir is None else basedir

Callers 3

test__get_versionMethod · 0.95
docmoduleMethod · 0.45
docmoduleMethod · 0.45

Calls 2

_is_stdlib_moduleMethod · 0.95
strFunction · 0.85

Tested by 1

test__get_versionMethod · 0.76