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

Method getcookedpat

Lib/idlelib/searchengine.py:67–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 self.setpat(pat)
66
67 def getcookedpat(self):
68 pat = self.getpat()
69 if not self.isre(): # if True, see setcookedpat
70 pat = re.escape(pat)
71 if self.isword():
72 pat = r"\b%s\b" % pat
73 return pat
74
75 def getprog(self):
76 "Return compiled cooked search pattern."

Callers 2

getprogMethod · 0.95
test_getcookedpatMethod · 0.80

Calls 4

getpatMethod · 0.95
isreMethod · 0.95
iswordMethod · 0.95
escapeMethod · 0.80

Tested by 1

test_getcookedpatMethod · 0.64