In most cases a copy-and-paste of an interactive console session works fine, but doctest isn't trying to do an exact emulation of any specificPython shell. ほとんどの場合、対話コンソールセッション上でのコピー/ペーストはうまく動作します。 とはいえ、 doctest は特定の Python シェルの振る舞いを正確にエミュレーションしようとするわけではありません。 - Python
Copyright 2001-2004 Python Software Foundation.All rights reserved. Copyright 2000 BeOpen.com.All rights reserved. Copyright 1995-2000 Corporation for National Research Initiatives.All rights reserved. Copyright 1991-1995 Stichting Mathematisch Centrum.All rights reserved.