PyCharm - Function argument tooltips - Poor compared to IDLE

I am a teacher contemplating a switch over to PyCharm from IDLE for my GCSE and A-level classes.

The only negative I have found so far is some of the tooltips shown regarding function arguments and return values are poor in PyCharm in comparison to IDLE.

For example,

After importing the random module and typing i = random.randint()

The tooltip from PyCharm: "self: Random, a,b: {__add_}

The tooltip from IDLE: (a, b) Return random integer in range [a, b], including both end points.

It may come across as a trivial matter but for many of my students, this is the first time they are using Python (or any other programming language) so these tooltips really do help them.

We will still be making the switch over but is this something that is likely to be improved at some point?

0

Hi there,

Hmm, I see. It happens because of the way randint(a, b) and other function are defined in random module (as assigned bound methods of an instance of Random). We could add some special handling for this module. Thanks for noticing.

In theory, the situation with such indirectly defined symbols in various libraries will improve much when we finish migration to type stubs from typeshed project. But at the moment it lacks proper docstring for the function just as well (though features clearer type signature).

0

请先登录再写评论。