MCPcopy Index your code
hub / github.com/bpython/bpython / ask_confirmation

Method ask_confirmation

bpython/urwid.py:865–872  ·  view source on GitHub ↗

Ask for yes or no and return boolean

(self, q)

Source from the content-addressed store, hash-verified

863 return self.stdout_hist + "\n"
864
865 def ask_confirmation(self, q):
866 """Ask for yes or no and return boolean"""
867 try:
868 reply = self.statusbar.prompt(q)
869 except ValueError:
870 return False
871
872 return reply.lower() in ("y", "yes")
873
874 def reevaluate(self):
875 """Clear the buffer, redraw the screen and re-evaluate the history"""

Callers

nothing calls this directly

Calls 1

promptMethod · 0.45

Tested by

no test coverage detected