On 09Mar2023 13:08, Grant Edwards <grant.b.edwa...@gmail.com> wrote:
Having a module modify the behavior of a built-in makes me cringe.

Maybe. But input(), like print(), is one of those funky conveniences for human interaction. I'm somewhat ok with that. If for no other reason than to make keyboard arrow keys act as normal humans expect them to (as opposed to old nerds who predate such fancies). General improvement of the user experience.

Another thing affected by readline is the cmd module, which will use it during the input step for completion _if the module is present_. And use it for the input itself if it is loaded. (These might not mean different things and instead be an accident of phrasing.) Again, a human interaction convenience and I'm good with it.

Good enough to have written this code recently:

    try:
      import readline
    except ImportError:
      pass

just to turn it on if available.

Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to