Which Option Should I Use? Types and Operations 4. Statements and Syntax X print Function The Python 2. X Impacts on 2.
Functions and Generators Function Basics Why Use Functions? X nonlocal Basics nonlocal in Action Why nonlocal? State Retention Options State with nonlocal: 3. Generalized Set Functions Emulating the Python 3. Modules and Packages Find It 2. Compile It Maybe 3. Classes and OOP X But 3. Static Methods in 2. Exceptions and Tools Exception Basics Why Use Exceptions? Advanced Topics Unicode and Byte Strings String Changes in 3. X String Literals Python 2. X Type and Content Mismatches in 3. X Handling the BOM in 3.
X Unicode Files in 2. Managed Attributes Why Manage Attributes? X Declaration in 2. X Metaclass Dispatch in Both 3. Appendixes A. The Python 3. Python Changes and This Book Major 2. You'll also learn some advanced language features that recently have become more common in Python code.
Explore Python's major built-in object types such as numbers, lists, and dictionaries Create and process objects with Python statements, and learn Python's general syntax model Use functions to avoid code redundancy and package code for reuse Organize statements, functions, and other tools into larger components with modules Dive into classes: Python's object-oriented programming tool for structuring code Write large programs with Python's exception-handling model and development tools Learn advanced Python tools, including decorators, descriptors, metaclasses, and Unicode processing.
Learning Python. Portable, powerful, and a breeze to use, Python is the popular open source object-oriented programming language used for both standalone programs and scripting applications. Python is considered easy to learn, but there's no quicker way to mastery of the language than learning from an expert teacher. This edition of Learning Python puts you in the hands of two expert teachers, Mark Lutz and David Ascher, whose friendly, well-structured prose has guided many a programmer to proficiency with the language.
Learning Python, Second Edition, offers programmers a comprehensive learning tool for Python and object-oriented programming. Thoroughly updated for the Portable, powerful, and a breeze to use, Python is ideal for both standalone programs and scripting applications. With this hands-on book, you can master the fundamentals of the core Python language quickly and efficiently, whether you're new to programming or just new to Python.
Once you finish, you will know enough about the language to use it in any application domain you choose. Learning Python is based on material from author Mark Lutz's popular training courses, which he's taught over the past decade. Each chapter is a self-contained lesson that helps you thoroughly understand a key component of Python before you continue. Along with plenty of an
0コメント