Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to write a python doctest

def a_function(*args):
  '''
  >>>an input
  expected output
  '''
  if this:
    return that
# A doctest may also include a docstring
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #write #python #doctest
ADD COMMENT
Topic
Name
4+9 =