New submission from Amy: https://docs.python.org/3/tutorial/controlflow.html#default-argument-values def ask_ok(prompt, retries=4, complaint='Yes or no, please!'): while True: ok = input(prompt)
Suggestion: change to "ok = input(prompt).lower()" in order to cover values with capitalized characters such as "Yes" or "NO". ---------- messages: 233114 nosy: amyluo priority: normal severity: normal status: open title: Python Tutorial 4.7.1: Improve ask_ok() to cover more input values type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23116> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com