Book Detail :
Paperback : 538 Pages
Language : English
File Size : 1.30 Mb | File Format : PDF
Introduction
This book is intended to be a concise reference to the Python programming language. Although an
experienced programmer will probably be able to learn Python from this book, it’s not intended to be an extended tutorial or a treatise on how to program. Rather, the goal is to present the core Python language, the contents of the Python library, and the Python extension API in a manner that’s accurate and succinct. This book assumes that the reader has prior programming experience with Python or other languages such as C or Java. In addition, a general familiarity with systems programming topics (for example, basic operating system concepts, process management, and network programming) may be useful in understanding certain parts of the library reference.
What’s Inside?
The contents of this book are based on Python 2.1. However, readers should be aware that Python is a constantly evolving language. Most of the topics described herein are likely to be applicable to future versions of Python 2.x. In addition, most topics are applicable to earlier releases. To a lesser extent, the topics in this book also apply to JPython, an implementation of Python entirely in Java.
However, that is not the primary focus of this book.
It should be noted that just as Python is an evolving language, the Second Edition of Python Essential Reference has evolved to make use of new language features and new library modules added in Python 2.1. Rather than merely describing new language features as an afterthought, recently added features have been freely used and incorporated throughout the text. Although no distinction is given to new additions, detailed descriptions of language changes can easily be found online.
Finally, note that Python is distributed with hundreds of pages of reference documentation. The contents of this book are largely based on that documentation, but with a number of enhancements, additions, and omissions. First, this reference presents most of the same material in a more compact form, with different examples and alternative descriptions of many topics. Second, a significant number of topics in the library reference have been expanded to include additional outside reference material. This is especially true for low-level system and networking modules in which effective use of a module normally relies on a myriad of options listed in UNIX manual pages and outside reference material. In addition, in order to produce a more concise reference, a number of deprecated and relatively obscure library modules have been omitted. Finally, this reference doesn’t attempt to cover large frameworks such as Tkinter, XML, or the COM extensions, as these topics are beyond the scope of this book and are described in books of their own.
About the Author
David M. Beazley is the developer of SWIG, a popular software package for integrating C programs with interpreted languages including Python, Perl, and Tcl. He has been actively involved with the Python community since 1996 and is currently working on projects related to mixed-mode debugging of scripting language extensions. Dave spent seven years working in the Theoretical Physics Division at Los Alamos National Laboratory, where he helped pioneer the use of Python with high-performance simulation software running on parallel computers. He is currently an assistant professor in the Department of Computer Science at the University of Chicago, where he enjoys tormenting students with insane programming projects in operating systems, networks, and compilers courses.
Main Contents:
1. A Tutorial Introduction.
Rungning Python.
Variables and Arithmetic Expressions.
Conditionals.
File Input and Output.
Strings.
Lists and Tuples.
Loops.
Dictionaries.
Functions.
Classes.
Exceptions.
Modules.
2. Lexical Conventions and Syntax.
Line Structure and Indentation.
Identifiers and Reserved Words.
Literals.
Operators, Delimiters, and Special Symbols.
Documentation Strings.
3. Types and Objects.
Terminology.
Object Identity and Type.
Reference Counting and Garbage Collection.
Reference and Copies.
Built-in Types.
Special Methods.
Performance and Memory Considerations.
4. Operators and Expressions.
Operations on Numbers.
Operations on Squences.
Operations on Dictionaries.
Augmented Assignment.
The Attribute (.) Operator.
Type Conversion.
Unicode Strings.
Boolean Expressions and Truth Values.
Object Equality and Identity.
Order of Evaluation.
5. Control Flow.
Conditionals.
Loops.
Exceptions.
Defining New Exceptions.
Assertions and - debug.
6. Functions and Functional Programming.
Functions.
Parameter Passing and Return Values.
Scoping Rules.
Recursion.
The apply() Function.
The lambda Operator.
map(), zip(), reduce(), and filter().
List Comprehensions.
eval(), exec, execfile(), and compile().
7. Classes and Object-Oriented Programming.
The class statement.
Class Instances.
Reference Counting and Instance Destruction.
Inheritance.
Polymorphism.
Information Hiding.
Operator Overloading.
Classes, Types, and Membership Tests.
8. Modules and Packages.
Modules.
The Module Search Path.
Module Loading and Compilation.
Module Reloading.
Packages.
9. Input and Output.
Reading Options and Environment Variables.
Files.
Standard Input, Output, and Error.
The print Statement.
Persistence.
Unicode I/O.
10. Execution Environment.
Interpreter Options and Environment.
Interactive Sessions.
Launching Python Applications.
Site Configuration Files.
Enabling Future Features.
Program Termination.
A. The Python Library.
Built-in Functions and Exceptions.
Python Services.
Mathematics.
String Handling.
Data Management and Object Persistence.
Operating System Services.
Threads.
Network Programming.
Internet Data Handling and Encoding.
Restricted Execution.
Miscellaneous Modules.
The Phython Debugger.
The Phython Profiles.
Undocumented Modules.
B. Extending and Embedding Phython.
Enabling Optional Modules.
Compilation of Extensions.
Converting Data from C to Phython.
Error Handling.
Reference Counting.
Calling Phython from C.
Abstract Object Layer.
Low-Level Functions on Built-in Types.
Defining New Types.
Special Methods for Types.
Threads.
Embedding.
Extension Building Tools.
Direct Link Download :
Rapidgator : Python Essential Reference_ 2nd Edition
Mediafire : Python Essential Reference_ 2nd Edition
0 comments:
Post a Comment