[Tutor] when is a generator "smart?"

Steven D'Aprano steve at pearwood.info
Mon Jun 3 05:35:02 CEST 2013


On 03/06/13 12:50, Jim Mooney wrote:

> In regard to that, I just tried importing Tkinter, according to a
> guide I'm using. Except the guide is using tkinter and not Tkinter,
> but Py27 has Tkinter. Lord knows why they bothered to change one lousy
> letter - it would be less confusing to have given it an entirely new
> name like notyourmothersKinter ;')

Consistency with the recommended style guide for Python libraries.

Modules should be written in lowercase. For historical reasons, some modules, like tkinter, weren't. Prior to Python 3, that couldn't be changed for backwards compatibility. But Python 3 was allowed to break backwards compatibility for the sake of consistency.

For the sake of a little bit of pain during the transition, the end result will be a better product in the future.



-- 
Steven


More information about the Tutor mailing list