注冊 | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當前位置: 首頁出版圖書科學技術(shù)計算機/網(wǎng)絡(luò)軟件與程序設(shè)計其他編程語言/工具學習Python(第3版 影印版)

學習Python(第3版 影印版)

學習Python(第3版 影印版)

定 價:¥88.00

作 者: (美)盧茨(Lutz,M) 著
出版社: 東南大學出版社
叢編項:
標 簽: 程序設(shè)計

ISBN: 9787564112400 出版時間: 2008-08-01 包裝: 平裝
開本: 16開 頁數(shù): 700 字數(shù):  

內(nèi)容簡介

  Python是一種理想的獨立程序和腳本程序語言,具有可移植、強大和易用的特點。無論您是初學程序設(shè)計還是初學Python,都能通過本書快速而高效地掌握Python核心語言的基礎(chǔ)。通讀本書,您可以獲得足夠多的知識,能夠?qū)W習將Python用于您所選擇的任何應用領(lǐng)域?!秾W習Python(第三版)》基于作者Mark Lutz在過去10年間講授培訓課程所使用的資料。除了大量的注解插圖和每章總結(jié)外,作者還為每章加入了獨特的一節(jié),通過實際練習和復習提問的方式,讓您在學習過程中練習新的技能,測驗對概念的理解程度。本書內(nèi)容包括:類型和運算——深入Python內(nèi)置對象類型:數(shù)值、列表、字典及其他。語句和語法——用來創(chuàng)建和處理對象的Python代碼以及Python通用語法模型。函數(shù)——Python的基本結(jié)構(gòu)化和代碼重用工具。模塊——將語句、函數(shù)和其他工具組織為更大的組件。類和面向?qū)ο缶幊獭蛇x的Python面向?qū)ο蟪绦蛟O(shè)計工具,用于定制和重用結(jié)構(gòu)化代碼。異常和工具——處理語句和模塊異常,并介紹編寫較大型程序所使用的開發(fā)工具。有關(guān)即將發(fā)布的Python 3.0的一些討論。《學習Python 第三版》為您理解Python語言提供了完整而又深入的介紹,幫助您領(lǐng)會在以后的工作中會遇到的應用級Python實例。如果您準備好探索Google和YouTube究竟從Python中發(fā)現(xiàn)了什么,那么本書就是一個最好的開始。

作者簡介

  盧茨 (Lutz.M.),作為Python培訓界的領(lǐng)軍人物,Mark Lutz是有關(guān)Python方面的最早和最暢銷書籍的作者,并且從1992年起就是Python社區(qū)的先驅(qū)之一。同時他還是OReilly的《Programming Python》和《Python Pocket Reference》兩本書的作者。Mark從1997年開始教授Python課程,截至2007年已經(jīng)指導了超過200次培訓。此外Mark擁有計算機科學學士和碩士學位,以及25年的軟件開發(fā)經(jīng)驗。

圖書目錄

Preface
PartⅠ.Getting Started
1.A Python Q&A Session
  Why Do People Use Python?
   Software Quality
   Developer Productivity
   Is Python a“Scripting Language”?
   OK,but What’S the Downside?
   Who Uses Python Today?
   What Can I Do with Python?
   Systems Programming
   GUIs
   Internet Scripting
   Component Integration
   Database Programming
   Rapid Prototyping
   Numeric and Scientific Programming
   Gaming,Images,AI,XML,Robots,and More
  What Are Python’S Technical Strengths?
   It’S Object Oriented
   It’S Free
   It’S Portable
   It’S Powerful
   It’S Mixable
  It’S Easy to Use
   It’S Easy to Learn
   It’s Named After Monty Python
  How Does Python Stack Up to Language X?
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
 2.How Python Runs Programs
  Introducing the Python Interpreter
  Program Execution
   The Programmer’S View
   Python’S View
   Byte code compilation
   The Python Virtual Machine(PVM)
   Performance implications
   Development implications
  Execution Model Variations
   Python Implementation Alternatives
    CPython
   Jython
   IronPython
   Execution Optimization Tools
   The Psyco just-in-time compiler
   The Shedskin C++translator
   Frozen Binaries
   Future Possibilities?
   Chapter Summary
   Brain Builder
    Chapter Quiz
    Quiz Answers
 3.How You Run Programs
  Interactive Coding
   Using the Interactive Prompt
  System Command Lines and Files
   Using Command Lines and Files
   Unix Executable Scripts(#!)
  Clicking File Icons
   Clicking Icons on Windows
   The raw_input Trick
   0ther Icon-Click Limitations
   Module Imports and Reloads
   The Grander Module Story:Attributes
   Modules and namespaces
   import and reload Usage Notes
   The IDLE User Interface
   IDLE Basics
   Using 1DLE
   Advanced 1DLE Tools
   0ther IDEs
   Embedding Calls
   Frozen Binary Executables
   Text Editor Launch Options
   0ther Launch Options
   Future Possibilities?
  Which 0ption Should I Use?
  Chapter Summary
   Brain Builder
   Chapter Quiz
   Ouiz Answers
   Brain Builder:Part I Exercises
PartⅡ.Types and Operations
 4.Introducing Python 0bject Types
  Why Use Built—in Types?
   Python’S Core Data Types
  Numbers
  Strings
   Sequence Operations
   Immutability
   Type—Specific Methods
   Getting Help
   Other Ways to Code Strings
   Pattern Matching
  Lists
   Sequence Operations
   Type—Specific Operations
   Bounds Checking
   Nesting
   List Comprehensions
  Dictionaries
   Mapping Operations
   Nesting Revisited
   Sorting Keys:for Loops
   Iteration and Optimization
   Missing Keys:if Tests
  Tuples
  Why Tuples?
  Files
   Other File-Like Tools
  Other Core Types
   How to Break Your Code’S Flexibility
  User—Defined Classes
   And Everything Else
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
 5.Numbers
 Python Numeric Types
  Numeric Literals
   Built—in Numeric Tools and Extensions
  Python Expression Operators
   Mixed Operators Follow Operator Precedence
   Parentheses Group Subexpressions
   Mixed Types Are Converted Up
   Preview:Operator Overloading
  Numbers in Action
   Variables and Basic ExpressionS
   Numeric Display Formats
   Division:Classic,F(xiàn)loor,and True
   Bitwise Operations
   Long Integers
   Complex Numbers
   Hexadecimal and Octal Notation
   Other Built.in Numeric Tools
  Other Numeric Types
   Decimal Numbers
   Sets
   Booleans  
   Third.Party Extensions
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
 6.The DynamicTyping Interlude
  The Case of the Missing Declaration Statements
  Variables,Objects,and References
  Types Live with Objects,Not Variables
  Objects Are Garbage—Collected
  Shared Refe:rences
  Shared References and In—Place Changes
  Shared References and Equality
  Dynamic Typing Is Everywhere
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
 7.Strings
  String Literals
   Single,and Double.Quoted Strings Are the Same
   Escape Sequences Represent Special Bytes
   Raw Strings Suppress Escapes
   Triple Quotes Code Multiline Block Strings
   Unicode Strings Encode Larger Character Sets
  Strings in Action
   Basic Operations
   Indexing and Slicing
  Extended slicing:the third limit
  String Conversion Tools
  Character code conversions
   Changing Strings
  String Formatting
   Advanced String Formatting
   Dictionary—Based String Formatting
  String Methods
   String Method Examples:Changing Strings
   String Method Examples:Parsing Text
   Other Common String Methods in Action
   The Original string Module
  General Type Categories
   Types Share Operation Sets by Categories
   Mutable Types Can Be Changed In—Place
  Chapter Summary
  Brain Builder
   Chapter Quiz
   quiz Answers
 8.Lists and Dictionaries
  Lists
  Lists in Action
   Basic List Operations
   Indexing,Slicing,and Matrixes
   Changing Lists In—Place
   Index and slice assignments
   List method calls
   Other common list operations
  Dictionaries
  Dictionaries in Action
   Basic Dictionary Operations
   Changing Dictionaries In—Place
   More Dictionary Methods
   A Languages Table
   Dictionary Usage Notes
   Using dictionaries to simulate flexible lists
   Using dictionaries for sparse data structures
   Avoiding missing-key errors
   Using dictionaries as“records”
   Other ways to make dictionaries
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
 9.Tuples,Files,and Everthing Else
  Tuples
   Tuples in Action
   Tuple syntax peculiarities:commas and parentheses
  Conversions and immutability
   Why Lists and Tuples?
  Files
   Opening Files
   Using Files
  Files in Action
  Storing and parsing Python objects in files
  Storing native Python objects with pickle
  Storing and parsing packed binary data in files
   Other File Tools
  Type Categories Revisited
  Object Flexibility
  References Versus Copies
  Comparisons,Equality,and Truth
   The Meaning of True and False in Python
  Python’S Type Hierarchies
  Other Types in Python
  Built.in Type Gotchas
   Assignment Creates References,Not Copies
   Repetition Adds One Level Deep
  Beware of Cyclic Data Structures
   Immutable Types Can’t Be Changed In-Place
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
  Brain Builder:Part II Exercises
PartⅢ Statements and Syntax
  Introducing Python Statements
  Python Program Structure Revisited
   Python’S Statements
  ATale ofTwo ifs
  What Python Adds
  What Python Removes
   Parentheses are optional
   End of line iS end of statement
   End of indentation iS end of block
  Why Indentation Syntax?
  A Few Special Cases
  Statement rule special cases
  Block rule special case
  A Quick Example:Interactive Loops
   A Simple Interactive Loop
   Doing Math on User Inputs
   Handling Errors by Testing Inputs
   Handling Errors with try Statements
   Nesting Code Three Levels Deep
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
 11.Assignment,Expressions,and print
  Assignment Statements
   Assignment Statement Forms
   Sequence Assignments
   Advanced sequence assignment patterns
   Multiple—Target Assignments
Multiple—target assignment and shared references
   Augmented Assignments
  Augmented assignment and shared references
  Variable Name Rules
  Naming conventions
  Names have no type,but objects do
  Expression Statements
   Expression Statements and In-Place Changes
  print Statements
   The Python“Hello World”Program
   Redirecting the Output Stream
   The print>>file Extension
   Chapter Summary
   Brain Builder
   Chapter Quiz
   Quiz Answers
 12.if Tesis
if Statements
  General Format
  Basic Examples
  Multiway Branching
Python Syntax Rules
  Block Delimiters
  Statement Delimiters
  A Few Special Cases
Truth Tests
  The if/else Ternary Expression
Chapter Summary
Brain Builder
  Chapter Quiz
  Quiz Answers
 13.while and for Loops
while Loops
  General Format
  Examples
  break,continue,pass,and the Loop else
  General Loop Format
  Examples
   pass
   continue
   break
   else
   More on the loop else clause
  forLoops
  General Format
  Examples
   Basic usage
   Other data types
  Tuple assignment in for
  Nested for loops
  Iterators:A First Look
   File Iterators
   Other Built—in Type Iterators
   Other Iteration Contexts
   User—Defined Iterators
  Loop Coding Techniques
   Counter Loops:while and range
   Nonexhaustive Traversals:range
   Changing Lists:range
   Parallel Traversals:zip and map
Dictionary construction with zip
   Generating Both 0ffsets and Items:enumerate
  List Comprehensions:A First Look
   List Comprehension Basics
   Using List Comprehensions on Files
   Extended List Comprehension Syntax
  Chapter Summary
  Brain Builder
   Chapter Quiz
   Quiz Answers
 14.The Documentation Interlude
Python Documentation Sources
  #Comments
  The dir Function
  Docstrings:--doc--
   User-defined docstrings
   Docstring standards
   Built-in docstrings
  PyDoc:The help Function
  PyDoc:HTML Reports
  Standard Manual Set
  Web Resources
  Published Books
Common Coding Gotchas
  ……
PartⅣ Function
15.Function Basics
16.Scopes and Arguments
17.Advanced Function Topics
PartⅤ.Modules
18.Modules:The Big Picture
19.Module Coding Basics
20.Module Packages
21.Advanced Module Topics
PartⅥ Classes and OOP
22.OOP:The Big Picture
23.Class Coding Basics
24.Class Coding Details
25.Designing with Classes
26.Advanced Class Topics
PartⅦ Exceptions and Tools
27.Exception Basics
28.Exception Objects
29.Designing with Exceptions
PartⅧ Appendixes
A.Installation and Configuration
B.Solutions to End-of-Part Exercises
Index

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號 鄂公網(wǎng)安備 42010302001612號