MCPcopy Index your code
hub / github.com/python/cpython / get

Function get

Lib/idlelib/searchengine.py:7–16  ·  view source on GitHub ↗

Return the singleton SearchEngine instance for the process. The single SearchEngine saves settings between dialog instances. If there is not a SearchEngine already, make one.

(root)

Source from the content-addressed store, hash-verified

5from tkinter import messagebox
6
7def get(root):
8 '''Return the singleton SearchEngine instance for the process.
9
10 The single SearchEngine saves settings between dialog instances.
11 If there is not a SearchEngine already, make one.
12 '''
13 if not hasattr(root, "_searchengine"):
14 root._searchengine = SearchEngine(root)
15 # This creates a cycle that persists until root is deleted.
16 return root._searchengine
17
18
19class SearchEngine:

Callers 15

test_asyncMethod · 0.50
__enter__Method · 0.50
__exit__Method · 0.50
check_statlike_dir_fdMethod · 0.50
test_is_in_stringMethod · 0.50
test_is_in_codeMethod · 0.50
test_get_expressionMethod · 0.50
test_get_regionMethod · 0.50
test_writeMethod · 0.50

Calls 1

SearchEngineClass · 0.85

Tested by 15

test_asyncMethod · 0.40
check_statlike_dir_fdMethod · 0.40
test_is_in_stringMethod · 0.40
test_is_in_codeMethod · 0.40
test_get_expressionMethod · 0.40
test_get_regionMethod · 0.40
test_writeMethod · 0.40
test_writelinesMethod · 0.40
test_getMethod · 0.40