[Python-ideas] Default value for input

Paul Moore p.f.moore at gmail.com
Tue Apr 1 18:42:10 CEST 2014


On 1 April 2014 17:16, Steven D'Aprano <steve at pearwood.info> wrote:
>> -1 on it being a builtin capability of input(). -0 on it being a
>> separate builtin or stdlib function (mainly because I don't think it's
>> needed often enough to be worth it). It seems to me it'd be fine as a
>> package on PyPI, or maybe a recipe.
>
> I obviously don't agree with you, but I appreciate the comments.
> Regardless of what happens in 3.5, I'll look at putting something up on
> PyPI, although chances are it will require readline support and won't be
> platform-independent. That will limit its use drastically.

Having a better idea of your use case (lighter-weight version of a
curses-style interface) I can see why it would be useful. Although I
didn't think anyone still write text-based UIs ;-)

With that in mind, and *particularly* since the curses module is not
supported on Windows, I'm persuaded that it's a useful idea (to have
available *somewhere*). But probably only if it's cross-platform, and
even then I'd wouldn't expect it to be part of the built in input().
After all getpass is an even more common requirement for user input,
and *that* didn't warrant being built into input :-)

Paul


More information about the Python-ideas mailing list