Hacker News new | ask | show | jobs
by kzrdude 1842 days ago
Inline code completion/IDE integration can have it show the parameter names or docstring inline in the editor. That helps me with map, specifically. :)

With that configured, a window pops up in Vim and says we have:

    map(func: Callable[[_T1], _S], iter1: Iterable[_T1], /) -> Iterator[_S]                                               
     ——————————————————————————————————————————————————————————————————————————————                                        
    map(func, *iterables) --> map object                                                                                  
                                                                                                                          
    Make an iterator that computes the function using arguments from                                                      
    each of the iterables.  Stops when the shortest iterable is exhausted.                                                
                                                                                                                          
    ——————————————————————————————————————————————————————————————————————————————

There are things to criticize here. Note that the type hinting (this is Python 3.8 btw) doesn't agree with the full generality of the stated function interface (the multiple iterables part).