[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-02 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the review. I removed the "-=" part from the patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef800c30e28c by Berker Peksag in branch '3.5': Issue #23116: Improve ask_ok() example in the Python tutorial https://hg.python.org/cpython/rev/ef800c30e28c New changeset 174eae50b664 by Berker Peksag in branch 'default': Issue #23116: Merge from 3.5

[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think the patch is okay except for the use of "-=" instead of the more verbose version. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Berker Peksag
Berker Peksag added the comment: Here is a patch. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file43088/issue23116.diff ___ Python tracker _

[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: +1 for ValueError instead of OSError. -- nosy: +fdrake ___ Python tracker ___ ___ Python-bugs-li

[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Berker Peksag
Berker Peksag added the comment: I agree with all of Carol's suggestions. Also, OSError could be replaced with a more appropriate exception such as ValueError. -- nosy: +berker.peksag stage: -> needs patch versions: +Python 3.5, Python 3.6 -Python 3.4 _

[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2015-01-03 Thread Carol Willing
Carol Willing added the comment: @amylou Thank you for submitting this documentation suggestion about the Python Tutorial. This tutorial section, 4.7.1 Default Argument Values, tries to show that a function can have multiple input arguments which may be given default values. While the suggest

[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2014-12-26 Thread Amy
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 capital