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

Function read_docstrings

Lib/turtle.py:4001–4016  ·  view source on GitHub ↗

Read in docstrings from lang-specific docstring dictionary. Transfer docstrings, translated to lang, from a dictionary-file to the methods of classes Screen and Turtle and - in revised form - to the corresponding functions.

(lang)

Source from the content-addressed store, hash-verified

3999 f.close()
4000
4001def read_docstrings(lang):
4002 """Read in docstrings from lang-specific docstring dictionary.
4003
4004 Transfer docstrings, translated to lang, from a dictionary-file
4005 to the methods of classes Screen and Turtle and - in revised form -
4006 to the corresponding functions.
4007 """
4008 modname = "turtle_docstringdict_%(language)s" % {'language':lang.lower()}
4009 module = __import__(modname)
4010 docsdict = module.docsdict
4011 for key in docsdict:
4012 try:
4013# eval(key).im_func.__doc__ = docsdict[key]
4014 eval(key).__doc__ = docsdict[key]
4015 except Exception:
4016 print("Bad docstring-entry: %s" % key)
4017
4018_LANGUAGE = _CFG["language"]
4019

Callers 1

turtle.pyFile · 0.85

Calls 2

__import__Function · 0.85
lowerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…