Multiline examples with blank lines. In [12]: def h(x): ....: if x>1: ....: return x**2 ....: # To leave a blank line in the input, you must mark it ....: # with a comment character: ....: # ....: # otherwise the doctest pars
()
| 52 | |
| 53 | |
| 54 | def doctest_multiline3(): |
| 55 | """Multiline examples with blank lines. |
| 56 | |
| 57 | In [12]: def h(x): |
| 58 | ....: if x>1: |
| 59 | ....: return x**2 |
| 60 | ....: # To leave a blank line in the input, you must mark it |
| 61 | ....: # with a comment character: |
| 62 | ....: # |
| 63 | ....: # otherwise the doctest parser gets confused. |
| 64 | ....: else: |
| 65 | ....: return -1 |
| 66 | ....: |
| 67 | |
| 68 | In [13]: h(5) |
| 69 | Out[13]: 25 |
| 70 | |
| 71 | In [14]: h(1) |
| 72 | Out[14]: -1 |
| 73 | |
| 74 | In [15]: h(0) |
| 75 | Out[15]: -1 |
| 76 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected