Raymond Hettinger <raymond.hettin...@gmail.com> added the comment: I recommend not going down this path. The intended purpose of doctest is to test examples in documentation. In particular, those examples should match what a user would *see* when running the examples. In essence, the proposal is to allow tests to pass even when the examples *don't* match what the user sees.
ISTM, the str_fun() example *should* fail. It does not show *any* real interactive prompt session than can be reproduced by a user or anything that a user would ever see. IMO, that would be a documentation anti-pattern. ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32042> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com