Page 421 -
P. 421

proper python


          #1: Doing things “The Python Way”


           Throughout this book, we have very stubbornly resisted writing
           code in the most correct Python Way. “That’s not how a Python
           programmer would do it,” was a familiar refrain heard from the
           Head First Programming technical reviewers. Without fail, and with the
           greatest of respect to our reviewers, we generally ignored this advice.
          You see, every programming language has its preferred, tried and
           true, agreed, and accepted way of doing certain things, collectively
           known as programming idioms. And Python is no exception. This is,
           of course, a very good thing, because the more programmers
           using a particular language who follow the standard way of doing
           something, the better. Except, that is, when writing a book like this:
           one designed from the get-go to teach programming concepts.          Holy smokes! I
                                                                                can‛t believe they did
           There are times when the idiom, although very smart, can be hard     it that way...
           to understand and even harder to explain. So, when we had a choice
           between showing you how to do something in a generic way over
           showing you how to do it the Python way, we nearly always chose
           the former approach over the latter. This has the effect of making
           some of the code in this book positively repulsive to hardened
           Python programmers, something that is of little concern to us, as
           this book isn’t for them (and they have lots of other books already).
           This book is for you: the reader who wants to learn how to program
           regardless of the programming language chosen.
           Having said all that, if you now want to learn more about The
          Python Way, start by scanning through the booklist and book reviews
           maintained on the main Python website:
                  http://wiki.python.org/moin/PythonBooks


                                       Yes, that’s supposed
                                        to be an “o”.






                                                          Python guru.



                                     Learn lots about Python from
                                     Mark Lutz’s classic, “Learning
                                             th
                                     Python, 4  Edition,” which now
                                     covers Python 3 and previous
           386    appendix i         releases.
   416   417   418   419   420   421   422   423   424   425   426