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

Method default_command

Lib/idlelib/replace.py:98–107  ·  view source on GitHub ↗

Handle the Replace+Find button as the default command. First performs a replace and then, if the replace was successful, a find next.

(self, event=None)

Source from the content-addressed store, hash-verified

96 self.do_replace()
97
98 def default_command(self, event=None):
99 """Handle the Replace+Find button as the default command.
100
101 First performs a replace and then, if the replace was
102 successful, a find next.
103 """
104 if self.do_find(self.ok):
105 if self.do_replace(): # Only find next match if replace succeeded.
106 # A bad re can cause it to fail.
107 self.do_find(False)
108
109 def _replace_expand(self, m, repl):
110 "Expand replacement text if regular expression."

Callers

nothing calls this directly

Calls 2

do_findMethod · 0.95
do_replaceMethod · 0.95

Tested by

no test coverage detected