◐ Shell
clean mode source ↗

Message 162353 - Python tracker

Callable instances now return a call tip. Good!

I agree with your analysis of the issue raised by Stephen. The get_argspec function will not fail unexpectedly.

> but typing list.append( resulting in weird behavior: something flashed and the typed text moved down a line.

I get "L.append(object) -> None -- append object to end" as the call tip on Linux. I'm not sure why it didn't work on Win 7. Could an unintentional enter key-press be the culprit?


> A different question is whether the default for callables (as opposed to non-callables) should be nothing or something like 'args unknown' or 'see docs'.

I agree that if the argspec string has no contents after all the code in get_argspec, then it should have a message added. Perhaps the following would be sufficient:

    if hasattr(ob, '__call__'):

        [truncated]

        if not argspec:
            argspec += "Arguments unknown. See docs."
    return argspec