Python: Essential Reference, Third Edition

Book description

Python Essential Reference, 3rd Edition, is a comprehensive reference to the Python programming language. The focus of this latest edition is to add coverage of significant new features and new library modules added to the language over the past five years. Clearly written with concise organization, the new features covered include new style classes, unification of types and classes, xmlrpclip, intertools, bz2 and optparse, making it the most up-to-date Python book on the market.

Table of contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. Introduction
  5. The Python Language
    1. A Tutorial Introduction
      1. Running Python
      2. Variables and Arithmetic Expressions
      3. Conditionals
      4. File Input and Output
      5. Strings
      6. Lists
      7. Tuples
      8. Sets
      9. Dictionaries
      10. Iteration and Looping
      11. Functions
      12. Classes
      13. Exceptions
      14. Modules
      15. Getting Help
    2. 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
      6. Decorators
      7. Source Code Encoding
    3. 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 Considerations
    4. Operators and Expressions
      1. Operations on Numbers
      2. Operations on Sequences
      3. Operations on Dictionaries
      4. Operations on Sets
      5. Augmented Assignment
      6. The Attribute (.) Operator
      7. Type Conversion
      8. Unicode Strings
      9. Boolean Expressions and Truth Values
      10. Object Equality and Identity
      11. Order of Evaluation
    5. Control Flow
      1. Conditionals
      2. Loops and Iteration
      3. Exceptions
      4. Defining New Exceptions
      5. Assertions and __debug__
    6. Functions and Functional Programming
      1. Functions
      2. Parameter Passing and Return Values
      3. Scoping Rules
      4. Functions as Objects
      5. Recursion
      6. The apply() Function
      7. The lambda Operator
      8. map(), zip(), reduce(), and filter()
      9. List Comprehensions
      10. Generators and yield
      11. Generator Expressions
      12. Function Decorators
      13. eval(), exec, execfile(), and compile()
    7. 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. Types and Class Membership Tests
      9. Classic Classes
      10. Metaclasses
    8. Modules and Packages
      1. Modules
      2. The Module Search Path
      3. Module Loading and Compilation
      4. Module Reloading
      5. Packages
    9. Input and Output
      1. Reading Options and Environment Variables
      2. Files and File Objects
      3. Standard Input, Output, and Error
      4. The print Statement
      5. Persistence
      6. Unicode I/O
    10. 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
  6. The Python Library
    1. Introduction to the Python Standard Library
      1. Library Overview
      2. Preview
    2. Built-in Functions and Exceptions
      1. Built-in Functions
      2. Built-in Exceptions
    3. Python Runtime Services
      1. atexit
      2. code
      3. copy
      4. copy_reg
      5. __future__
      6. gc
      7. inspect
      8. marshal
      9. new
      10. operator
      11. pickle and cPickle
      12. site
      13. sys
      14. traceback
      15. types
      16. warnings
      17. weakref
      18. UserDict, UserList, and UserString
    4. Mathematics
      1. cmath
      2. decimal
      3. math
      4. random
    5. Data Structures and Algorithms
      1. array
      2. bisect
      3. collections
      4. heapq
      5. itertools
    6. String and Text Handling
      1. codecs
      2. difflib
      3. gettext
      4. re
      5. string
      6. StringIO and cStringIO
      7. struct
      8. textwrap
      9. unicodedata
    7. Data Management and Object Persistence
      1. Introduction
      2. anydbm
      3. bsddb
      4. dbhash
      5. dbm
      6. dumbdbm
      7. gdbm
      8. shelve
      9. whichdb
    8. File Handling
      1. bz2
      2. csv
      3. filecmp
      4. fileinput
      5. fnmatch
      6. glob
      7. gzip
      8. tarfile
      9. zipfile
      10. zlib
    9. Operating System Services
      1. commands
      2. crypt
      3. datetime
      4. dl
      5. errno
      6. fcntl
      7. getopt
      8. getpass
      9. grp
      10. locale
      11. logging
      12. mmap
      13. msvcrt
      14. optparse
      15. os
      16. os.path
      17. platform
      18. popen2
      19. pwd
      20. resource
      21. shutil
      22. signal
      23. stat
      24. statvfs
      25. subprocess
      26. tempfile
      27. termios
      28. time
      29. tty
      30. _winreg
    10. Threads
      1. Thread Basics
      2. Python Threads
      3. thread
      4. threading
      5. Queue
    11. Network Programming
      1. Introduction
      2. asynchat
      3. asyncore
      4. select
      5. socket
      6. SocketServer
    12. Internet Application Protocols
      1. BaseHTTPServer
      2. cgi
      3. cgitb
      4. CGIHTTPServer
      5. Cookie
      6. cookielib
      7. DocXMLRPCServer
      8. encodings.idna
      9. ftplib
      10. httplib
      11. imaplib
      12. nntplib
      13. poplib
      14. robotparser
      15. SimpleHTTPServer
      16. SimpleXMLRPCServer
      17. smtplib
      18. urllib
      19. urllib2
      20. urlparse
      21. webbrowser
      22. xmlrpclib
    13. Internet Data Handling and Encoding
      1. base64
      2. binascii
      3. binhex
      4. email
      5. HTMLParser
      6. mailcap
      7. mimetypes
      8. quopri
      9. rfc822
      10. uu
      11. xdrlib
      12. xml
      13. xml.dom
      14. xml.dom.minidom
      15. xml.sax
      16. xml.sax.saxutils
    14. Cryptographic Services
      1. hmac
      2. md5
      3. sha
    15. Miscellaneous Modules
      1. Python Services
      2. String Processing
      3. Operating System Modules
      4. Network
      5. Internet Data Handling
      6. Multimedia Services
      7. Miscellaneous
    16. Debugging, Profiling, and Testing
      1. doctest
      2. hotshot
      3. pdb
      4. profile
      5. pstats
      6. timeit
      7. unittest
  7. Extending and Embedding
    1. Extending and Embedding Python
      1. Extension Module Example
      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. Threads
      11. Embedding
      12. Defining New Python Types
      13. Extension Building Tools
  8. Index

Product information

  • Title: Python: Essential Reference, Third Edition
  • Author(s): David Beazley
  • Release date: February 2006
  • Publisher(s): Sams
  • ISBN: 9780672328626