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

Method bind_ok

Lib/idlelib/config_key.py:267–279  ·  view source on GitHub ↗

Return True if Tcl accepts the new keys else show message.

(self, keys)

Source from the content-addressed store, hash-verified

265 return False
266
267 def bind_ok(self, keys):
268 "Return True if Tcl accepts the new keys else show message."
269 try:
270 binding = self.bind(keys, lambda: None)
271 except TclError as err:
272 self.showerror(
273 title=self.keyerror_title, parent=self,
274 message=(f'The entered key sequence is not accepted.\n\n'
275 f'Error: {err}'))
276 return False
277 else:
278 self.unbind(keys, binding)
279 return True
280
281
282class GetKeysWindow(Toplevel):

Callers 3

okMethod · 0.95
test_bind_okMethod · 0.80
test_bind_not_okMethod · 0.80

Calls 3

showerrorMethod · 0.95
bindMethod · 0.45
unbindMethod · 0.45

Tested by 2

test_bind_okMethod · 0.64
test_bind_not_okMethod · 0.64