[docs] Documentation bug -- Python 3.2 tutorial 4.7
Patrick Gann
patricksgann at gmail.com
Mon May 9 18:53:06 CEST 2011
To the wonderful Python volunteers,
I'm totally new to coding. Not just Python, but coding and scripting
in general. I know precious little bits of C, and I know html. I
thought I'd start fresh with something awesome, so I went to Python
3.2 and have been slowly walking myself through the tutorial and its
examples using "Python Portable."
I got stuck on 4.7
http://docs.python.org/py3k/tutorial/controlflow.html#more-on-defining-functions
I entered 'y' or 'n' and kept getting the complaint message. I
couldn't figure it out for the life of me. I called on my little
brother to help me. We did some basic troubleshooting using the
scripter, and determined by setting ok = y in the programming line,
that it was the input itself that wasn't being recognized properly. We
scoured the net, and then found this pretty annoying bug first
reported March 7th...
http://mail.python.org/pipermail/new-bugs-announce/2011-March/010263.html
Sure enough, if I change the line
if ok in ('y', 'ye', 'yes'):
to
if ok in ('y\r', 'ye\r', 'yes\r'):
Then when I just type 'y' or whatever, it'll go through. I can't
remove my own \r in the prompt.
For anyone learning by way of the tutorial, like I am, you might want
to put a temporary note in the documentation about the known bug, so
that until the fix is in, they can even witness the bug by doing y\r
in the code and explaining how the bug is affecting inputs. Learning
how this affects users, sort of a "troubleshooting 101," is also
really helpful for new users like myself. Just a suggestion.
(Yes, I'm too wordy. "Get on with it!")
Patrick
More information about the docs
mailing list