doctestprinter.set_in_quotes¶
-
doctestprinter.
set_in_quotes
(item: Any) → str¶ Set the string represenation of anything in quotes.
- Parameters
item (Any) – The item which will be set in quotes.
- Returns
str
Examples
>>> from doctestprinter import set_in_quotes >>> print(set_in_quotes(" a ")) ' a ' >>> print(set_in_quotes("")) '' >>> print(set_in_quotes("None")) 'None'
>>> from doctestprinter import doctest_iter_print >>> sample = ["o ", " o ", " o ", " o"] >>> doctest_iter_print(sample, edits_item=set_in_quotes) 'o ' ' o ' ' o ' ' o'