[Python-ideas] doctest
Mike Graham
mikegraham at gmail.com
Fri Mar 2 15:49:19 CET 2012
On Fri, Mar 2, 2012 at 8:05 AM, Devin Jeanpierre <jeanpierreda at gmail.com> wrote:
> This is totally fine
> >>> {-1:1, -2:1} # doctest: +LITERAL_EVAL
> {-1:1, -2:1}
Doing an ast.literal_eval seems like a great feature (and maybe even a
sensible default after a string comparison fails). Having a real eval
as an explicit doctest option would also make doctest more powerful.
Mike
More information about the Python-ideas
mailing list