Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 5f250fbafea211b21e464d8d3c8f09af0a1434f8 authored by Benjamin Peterson on 29 May 2011, 21:09:08 UTC
update pydoc-topics
Tip revision: 5f250fb
test_doctest.txt
This is a sample doctest in a text file.

In this example, we'll rely on a global variable being set for us
already:

  >>> favorite_color
  'blue'

We can make this fail by disabling the blank-line feature.

  >>> if 1:
  ...    print('a')
  ...    print()
  ...    print('b')
  a
  <BLANKLINE>
  b
back to top