tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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