Author: Armin Rigo <ar...@tunes.org> Branch: py3.5 Changeset: r94808:180dc8d9dd61 Date: 2018-07-05 17:34 +0200 http://bitbucket.org/pypy/pypy/changeset/180dc8d9dd61/
Log: Flush stdout also before the first prompt, because why not. The difference is visible by running: python3 -i -c "print(5,end='')" which is a very minor bug in CPython (3.5.3) diff --git a/lib_pypy/pyrepl/simple_interact.py b/lib_pypy/pyrepl/simple_interact.py --- a/lib_pypy/pyrepl/simple_interact.py +++ b/lib_pypy/pyrepl/simple_interact.py @@ -66,6 +66,10 @@ while 1: try: + try: + sys.stdout.flush() + except: + pass ps1 = getattr(sys, 'ps1', '>>> ') ps2 = getattr(sys, 'ps2', '... ') try: @@ -81,8 +85,3 @@ except MemoryError: console.write("\nMemoryError\n") console.resetbuffer() - finally: - try: - sys.stdout.flush() - except: - pass _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit