can someone tell me why this doesn't work please python 3

garywood pythonsky at sky.com
Wed Jan 14 14:52:44 CET 2009


def ask_ok(prompt, retries=4, complaint="Yes or no, please!"):
    while True:
        password = input("enter something")
        if password in ('y', 'ye', 'yes'): return True
        if password in ('n', 'no', 'nope'): return False
        retries = retries - 1
        if retries < 0:
            raise IOError('refusenik user')
        print(complaint)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090114/267300c9/attachment.html>


More information about the Python-list mailing list