Friday, August 10, 2012


About This Second Edition:

In the four years after the first edition of this book was published in late 1998, there have been substantial changes in both the Python language and in the topics presented by the authors in Python training sessions. Although we have attempted to retain as much of the original version as possible, this new edition reflects recent changes in both Python and Python training.

On the language front, this edition has been thoroughly updated to reflect Python 2.2, and all changes to the language since publication of the first edition. In addition, discussion of anticipated changes in the upcoming 2.3 release have been incorporated throughout. Some of the major language topics for which you'll find new or expanded coverage in this edition are:
  • List comprehension (Chapter 14)
  • Class exceptions (Chapter 25)
  • String methods (Chapter 5)
  • Augmented assignment (Chapter 8)
  • Classic, true, and floor division (Chapter 4)
  • Package imports (Chapter 17)
  • Nested function scopes (Chapter 13)
  • Generators and iterators (Chapter 14)
  • Unicode strings (Chapter 5)
  • Subclass types (Chapter 7 and Chapter 23)
  • Static and class methods (Chapter 23)
  • Pseudo-private class attributes (Chapter 23)
  • Extended print and import statements (Chapter 8 and Chapter 18)
  • New built-ins such as zip and isinstance (Chapter 7 and Chapter 10)
  • New-style classes (Chapter 23)
  • New configuration and launch options, and .pth files (Chapter 3 and Appendix A)
  • New development tools such as IDLE, Psyco, Py2exe, and Installer (Chapter 2, Chapter 3, and Chapter 29)
  • New testing and documentation tools such as PyDoc, PyUnit, and doctest (Chapter 11)
Smaller language changes (e.g., long integer promotion, module export lists) appear throughout the book. Besides such language changes, we augmented the core language parts of this edition (Part I-Part VII) with new topics and examples presented in the Python training sessions Mark has held in recent years. For example, you'll find:

  • A new OOP introduction (Chapter 19)
  • A new dynamic typing overview (Chapter 4)
  • A new development tools summary (Chapter 26)
  • New material on program architecture and execution (Chapter 2, Chapter 3, and Chapter 15)
  • New coverage of documentation sources (Chapter 11)
Many core language part additions and changes were made with beginners in mind. You'll also find that the coverage of many original core language topics has been substantially expanded in this edition, with new discussion and examples. Because this text has largely become the primary resource for learning the core Python language, we've taken liberties with making that coverage more complete than before, and added new use cases throughout. Likewise, we updated Part VIII to reflect recent Python application domains, and modern usage patterns.

In addition, this entire edition integrates a new set of Python tips and tricks, gleaned from both teaching classes over the last seven years, and using Python for real work over the last decade. The exercises have been updated and expanded to reflect current Python practice, new language features, and common beginner mistakes we've witnessed first-hand in recent years. Overall, this edition is bigger, both because Python is bigger, and because we've added context that has proved to be important in practice.

To accommodate the fact that this edition is more complete, we've split most of the original chapters into bite-sized chunks. That is, we've reorganized the core language section into many multichapter parts, to make the material easier to tackle. Types and statements, for instance, are now two top-level parts, with one chapter for each major type and statement topic. This new structure is designed to allow us to say more, without intimidating readers. In the process, exercises and gotchas were moved from chapter ends to part ends; they now appear at the end of the last chapter in each part.

Despite all the new topics, this book is still oriented toward Python newcomers, and is designed to be a first Python text for programmers.[1] It retains much of the first edition's material, structure, and focus. Where appropriate, we have expanded introductions for newcomers, and isolated the more advanced new topics from the main thread of discussion to avoid obscuring the fundamentals. Moreover, because it is largely based on time-tested training experience and materials, this edition, like the first, can still serve as a self-paced introductory Python class.

About the Author:

Mark Lutz is an independent Python trainer, writer, and software developer, and is one of the primary figures in the Python community. He is the author of the O'Reilly books Programming Python and Python Pocket Reference (both in 2nd Editions), and co-author of Learning Python (both in 2nd Editions). Mark has been involved with Python since 1992, began teaching Python classes in 1997, and has instructed over 90 Python training sessions as of early 2003. In addition, he holds BS and MS degrees in computer science from the University of Wisconsin, and over the last two decades has worked on compilers, programming tools, scripting applications, and assorted client/server systems. Whenever Mark gets a break from spreading the Python word, he leads an ordinary, average life with his kids in Colorado. Mark can be reached by email at , or on the web at http://www.rmi.net/~lutz.

David Ascher is the lead for Python projects at ActiveState, including Komodo, ActiveState's integrated development environment written mostly in Python. David has taught courses about Python to corporations, in universities, and at conferences. He also organized the Python track at the 1999 and 2000 O'Reilly Open Source Conventions, and was the program chair for the 10th International Python Conference. In addition, he co-wrote Learning Python (both editions) and serves as a director of the Python Software Foundation. David holds a B.S. in physics and a Ph.D. in cognitive science, both from Brown University.

Download:

0 comments:

Post a Comment