[Python-ideas] Open parenthesis in REPL completion

Jonathan Fine jfine2358 at gmail.com
Thu Apr 25 09:21:23 EDT 2019

This is an interesting thread. Here's my two cents worth. (Colloquial US
English for a low-value opinion.)

I'm in favour of sensible defaults (of course). In this situation, perhaps
this means defaults that work well for those who would find it difficult to
select a different default. Put enough way, values that work well for Emacs
users should not be the default (unless they also work well for beginners).

Sometimes, when I'm using a module for the first time (or when I'm puzzled
about Python's behaviour and online documentation), I find myself doing
    >>> help(something)
quite often. And I find myself typing
    >>> help({})
instead of
    >>> help(dict)
to avoid the unwanted
    >>> help(dict(

My preference, which might work well for a wide range of use cases, is
1. If the initial identifier is help, tab produces the opening paren (.
2. If the intial identifier is callable, tab produces the opening paren (.
3. After help(, tab does not produce opening paren (.
4. Otherwise, tab does produce opening paren (.
5. Perhaps, after something like
    >>> help(int
have tab produce the CLOSING paren ).

As I said, just my two cents worth. Your opinions may vary.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190425/f9b6ba63/attachment.html>

More information about the Python-ideas mailing list