MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / read_docstrings

Function read_docstrings

tools/python-3.11.9-amd64/Lib/turtle.py:3872–3887  ·  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

3870 f.close()
3871
3872def read_docstrings(lang):
3873 """Read in docstrings from lang-specific docstring dictionary.
3874
3875 Transfer docstrings, translated to lang, from a dictionary-file
3876 to the methods of classes Screen and Turtle and - in revised form -
3877 to the corresponding functions.
3878 """
3879 modname = "turtle_docstringdict_%(language)s" % {'language':lang.lower()}
3880 module = __import__(modname)
3881 docsdict = module.docsdict
3882 for key in docsdict:
3883 try:
3884# eval(key).im_func.__doc__ = docsdict[key]
3885 eval(key).__doc__ = docsdict[key]
3886 except Exception:
3887 print("Bad docstring-entry: %s" % key)
3888
3889_LANGUAGE = _CFG["language"]
3890

Callers 1

turtle.pyFile · 0.85

Calls 3

__import__Function · 0.85
printFunction · 0.50
lowerMethod · 0.45

Tested by

no test coverage detected