Python Essential Reference, Second Edition

Book description

Python Essential Reference, Second Edition, is the definitive guide to the Python programming language. Designed for programmers, it covers the core language, more than 100 modules in the standard library, and the techniques used to extend Python with compiled procedures in C or C++. Coverage expands upon and clarifies existing Python documentation - especially for advanced topics, including operating system interfaces, threads, network programming, and Unicode.

Concise, to the point, and extensively indexed, readers will find this volume packed with information not previously available in any other single reference source. Updated for Python 2.1, it is a must-have for any serious programmer wanting to develop advanced Python applications.

As a comprehensive reference to the Python programming language, this book will help you:

  • Learn about the features in Python 2.0 and 2.1

  • Master the details of Python types, operators, and the execution model

  • Discover the details of Unicode and internationalization support

  • Learn the details of operating system interfaces, threads, and network-programming modules

  • Build C/C++ extensions to Python

  • Make effective use of the Python library

  • Find the information you need to start developing advanced Python applications

  • Table of contents

    1. Copyright
    2. About the Author
    3. About the Technical Reviewers
    4. Acknowledgments
    5. Tell Us What You Think
    6. Introduction
    7. A Tutorial Introduction
      1. Running Python
      2. Variables and Arithmetic Expressions
      3. Conditionals
      4. File Input and Output
      5. Strings
      6. Lists and Tuples
      7. Loops
      8. Dictionaries
      9. Functions
      10. Classes
      11. Exceptions
      12. Modules
    8. Lexical Conventions and Syntax
      1. Line Structure and Indentation
      2. Identifiers and Reserved Words
      3. Literals
      4. Operators, Delimiters, and Special Symbols
      5. Documentation Strings
    9. Types and Objects
      1. Terminology
      2. Object Identity and Type
      3. Reference Counting and Garbage Collection
      4. References and Copies
      5. Built-in Types
      6. Special Methods
      7. Performance and Memory Considerations
    10. Operators and Expressions
      1. Operations on Numbers
      2. Operations on Sequences
      3. Operations on Dictionaries
      4. Augmented Assignment
      5. The Attribute (.) Operator
      6. Type Conversion
      7. Unicode Strings
      8. Boolean Expressions and Truth Values
      9. Object Equality and Identity
      10. Order of Evaluation
    11. Control Flow
      1. Conditionals
      2. Loops
      3. Exceptions
      4. Defining New Exceptions
      5. Assertions and _ _debug_ _
    12. Functions and Functional Programming
      1. Functions
      2. Parameter Passing and Return Values
      3. Scoping Rules
      4. Recursion
      5. The apply() Function
      6. The lambda Operator
      7. map(), zip(), reduce(), and filter()
      8. List Comprehensions
      9. eval(), exec, execfile(), and compile()
    13. Classes and Object-Oriented Programming
      1. The class statement
      2. Class Instances
      3. Reference Counting and Instance Destruction
      4. Inheritance
      5. Polymorphism
      6. Information Hiding
      7. Operator Overloading
      8. Classes, Types, and Membership Tests
    14. Modules and Packages
      1. Modules
      2. The Module Search Path
      3. Module Loading and Compilation
      4. Module Reloading
      5. Packages
    15. Input and Output
      1. Reading Options and Environment Variables
      2. Files
      3. Standard Input, Output, and Error
      4. The print Statement
      5. Persistence
      6. Unicode I/O
    16. Execution Environment
      1. Interpreter Options and Environment
      2. Interactive Sessions
      3. Launching Python Applications
      4. Site Configuration Files
      5. Enabling Future Features
      6. Program Termination
    17. The Python Library
      1. Built-in Functions and Exceptions
      2. Python Services
      3. Mathematics
      4. String Handling
      5. Data Management and Object Persistence
      6. Operating System Services
      7. Threads
      8. Network Programming
      9. Internet Data Handling and Encoding
      10. Restricted Execution
      11. Miscellaneous Modules
      12. The Python Debugger
      13. The Python Profiler
      14. Undocumented Modules
    18. Extending and Embedding Python
      1. Enabling Optional Modules
      2. Compilation of Extensions
      3. Converting Data from Python to C
      4. Converting Data from C to Python
      5. Error Handling
      6. Reference Counting
      7. Calling Python from C
      8. Abstract Object Layer
      9. Low-Level Functions on Built-in Types
      10. Defining New Types
      11. Special Methods for Types
      12. Threads
      13. Embedding
      14. Extension Building Tools
    19. Summary of Changes
      1. Python 1.6
      2. Python 2.0
      3. Python 2.1

    Product information

    • Title: Python Essential Reference, Second Edition
    • Author(s): David M Beazley
    • Release date: June 2001
    • Publisher(s): Sams
    • ISBN: 9780735710917