MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / read_docstrings

Function read_docstrings

Python/Turtle.py:3753–3768  ·  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

3751 f.close()
3752
3753def read_docstrings(lang):
3754 """Read in docstrings from lang-specific docstring dictionary.
3755
3756 Transfer docstrings, translated to lang, from a dictionary-file
3757 to the methods of classes Screen and Turtle and - in revised form -
3758 to the corresponding functions.
3759 """
3760 modname = "turtle_docstringdict_%(language)s" % {'language':lang.lower()}
3761 module = __import__(modname)
3762 docsdict = module.docsdict
3763 for key in docsdict:
3764 try:
3765# eval(key).im_func.__doc__ = docsdict[key]
3766 eval(key).__doc__ = docsdict[key]
3767 except Exception:
3768 print("Bad docstring-entry: %s" % key)
3769
3770_LANGUAGE = _CFG["language"]
3771

Callers 1

Turtle.pyFile · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected