|
Call Graph |
Apply syntax highlighting to a single substring from a doctest block.
s is the substring, and tag is the tag that
should be applied to the substring. tag will be one of the
following strings:
-
prompt -- the Python PS1 prompt (>>>)
-
more -- the Python PS2 prompt (...)
-
keyword -- a Python keyword (for, if, etc.)
-
builtin -- a Python builtin name (abs, dir, etc.)
-
string -- a string literal
-
comment -- a comment
-
except -- an exception traceback (up to the next
>>>)
-
output -- the output from a doctest block.
-
defname -- the name of a function or class defined by
a def or class statement.
-
other -- anything else (does *not* include
output.)
- Overrides:
DoctestColorizer.markup
- (inherited documentation)
|