Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
I don't think that will work. If the user passes a non-string which is falsey, your patch will attempt to write it directly to the stream without converting it to a string. Try ``_raw_input(0)`` as an example. Tal Einat: > one would expect passing prompt=None to result in no prompt displayed I wouldn't. That's not how getpass works now, or input. By the way, myungsekyo, that's not the best way to use timeit to time code snippets. You are timing the overhead of the loop, ten million lookups of the name "_raw_input", and most importantly, ten million times that _raw_input halts waiting for input from the user. Surely you didn't sit there hitting Enter over and over again? ---------- nosy: +steven.daprano _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37466> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com