Calltips and parameter defaults

When you enter a left parenthesis after the name of a callable object, PyCrust displays a calltip window (see figure 4.4) containing information about the arguments that are supplied to the callable, as well as the docstrings for the callable, if defined.

A callable object can be a function, method, built-in, or class. All of these can be defined to accept arguments, and may have docstrings that provide information about what the item does, and what kind of value is returned. Displaying this information in a temporary window positioned directly above or below the caret eliminates the need to refer to the documentation. If you know how to use the callable object, ignore the calltip and continue typing.

PyCrust fills in default parameters for the call when you enter the left parenthesis in the Python shell. As this is happening, PyCrust automatically selects the

Figure 4.4 The calltip feature displays information about a callable object.

additional text that was created, and subsequent keystrokes are replaced. To retain these parameters, press any of the caret movement keys (such as the arrow keys), and the text is unselected and available for your modifications.

Was this article helpful?

0 0

Post a comment