MCPcopy Create free account
hub / github.com/ipython/ipython / doctest_multiline2

Function doctest_multiline2

IPython/testing/plugin/test_ipdoctest.py:32–51  ·  view source on GitHub ↗

Multiline examples that define functions and print output. In [7]: def f(x): ...: return x+1 ...: In [8]: f(1) Out[8]: 2 In [9]: def g(x): ...: print('x is:',x) ...: In [10]: g(1) x is: 1 In [11]: g('hello') x is: hello

()

Source from the content-addressed store, hash-verified

30 """
31
32def doctest_multiline2():
33 """Multiline examples that define functions and print output.
34
35 In [7]: def f(x):
36 ...: return x+1
37 ...:
38
39 In [8]: f(1)
40 Out[8]: 2
41
42 In [9]: def g(x):
43 ...: print('x is:',x)
44 ...:
45
46 In [10]: g(1)
47 x is: 1
48
49 In [11]: g('hello')
50 x is: hello
51 """
52
53
54def doctest_multiline3():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected