You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-1927: Change input() to always prompt to stderr
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2015-11-21.23:09:28.737>created_at=<Date2015-11-21.22:01:43.070>labels= []
title='input function outputs prompt to stderr'updated_at=<Date2015-11-21.23:09:28.735>user='https://github.com/jaraco'
This has been discovered before: bpo-1927, with a simple patch. The choice between stdout and stderr seems to be rather complicated, so the patch may need a bit more work.
Activity
jaraco commentedon Nov 21, 2015
The built-in function 'input' appears to be sending the prompt to stderr instead of stdout, as the docs state it should.
I've replicated this behavior in both Python 3.4 on Linux and Python 3.5 and 2.7 on OS X. Here's the 2.7 test/output:
I believe the stated behavior (outputting the prompt to stdout) is the proper behavior.
I figure I must be doing something wrong here, because it seems bizarre to me that this discrepancy hasn't been discovered before.
vadmium commentedon Nov 21, 2015
This has been discovered before: bpo-1927, with a simple patch. The choice between stdout and stderr seems to be rather complicated, so the patch may need a bit more work.