MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / script_from_examples

Function script_from_examples

Lib/doctest.py:2522–2602  ·  view source on GitHub ↗

r"""Extract script from text with examples. Converts text with examples to a Python script. Example input is converted to regular code. Example output and all other words are converted to comments: >>> text = ''' ... Here are examples of simple math.

(s)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

testsourceFunction · 0.85
debug_srcFunction · 0.85

Calls 7

DocTestParserClass · 0.85
_comment_lineFunction · 0.85
splitMethod · 0.80
parseMethod · 0.45
appendMethod · 0.45
popMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected