[docs] [issue27455] Fix tkinter examples to be PEP8 compliant
Terry J. Reedy
report at bugs.python.org
Tue Jul 5 15:46:19 EDT 2016
Terry J. Reedy added the comment:
Except for replacing '' with ""*, I am strongly for this patch. To me, caMelcaSe is ugLy, and should not be encouraged. I disagree that camelCase is standard convention, at least not currently. Tkinter itself does not use it. It does not even use TitleCase much.
As near as I could find, neither http://effbot.org/tkinterbook/tkinter-index.htm nor http://www.tkdocs.com/tutorial/index.html introduce camelCase identifiers. For instance, http://effbot.org/tkinterbook/tkinter-hello-again.htm, instead of hiThere and sayHi, has
self.hi_there = Button(frame, text="Hello", command=self.say_hi)
* PEP 8 says "In Python, single-quoted strings and double-quoted strings are the same. This PEP does not make a recommendation for this." My personal convention is 'word', which occurs a lot in tkinter code, and 'multi-word phrase or sentence", which is much rarer. Why the change in the patch.
Python tracker <report at bugs.python.org>
More information about the docs