summaryrefslogtreecommitdiff
path: root/Lib/idlelib/calltips.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/calltips.py')
-rw-r--r--Lib/idlelib/calltips.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/Lib/idlelib/calltips.py b/Lib/idlelib/calltips.py
index 49625eac15..ec8f616989 100644
--- a/Lib/idlelib/calltips.py
+++ b/Lib/idlelib/calltips.py
@@ -1,9 +1,8 @@
-"""calltips.py - An IDLE Extension to Jog Your Memory
+"""Pop up a reminder of how to call a function.
Call Tips are floating windows which display function, class, and method
parameter and docstring information when you type an opening parenthesis, and
which disappear when you type a closing parenthesis.
-
"""
import inspect
import re
@@ -15,13 +14,8 @@ from idlelib import calltip_w
from idlelib.hyperparser import HyperParser
import __main__
-class CallTips:
- menudefs = [
- ('edit', [
- ("Show call tip", "<<force-open-calltip>>"),
- ])
- ]
+class CallTips:
def __init__(self, editwin=None):
if editwin is None: # subprocess and test
@@ -103,6 +97,7 @@ class CallTips:
else:
return get_argspec(get_entity(expression))
+
def get_entity(expression):
"""Return the object corresponding to expression evaluated
in a namespace spanning sys.modules and __main.dict__.
@@ -126,7 +121,6 @@ _default_callable_argspec = "See source or doc"
_invalid_method = "invalid method signature"
_argument_positional = "\n['/' marks preceding arguments as positional-only]\n"
-
def get_argspec(ob):
'''Return a string describing the signature of a callable object, or ''.