Learning Python = 学习Python / 第二版.

副标题:无

作   者:Mark Lutz & David Ascher.

分类号:

ISBN:9787564100476

微信扫一扫,移动浏览光盘

简介

  Python是流行、开源、面向对象的编程语言,既可以用于编写单机运行的程序也可以编写脚本程序,具有可移植,强大、易用等特点。跟随专业教师学习是最快捷的掌握此语言的方式。新版的《学习Python》把你带到Mark Lutz和David Ascher面前,他们是著名的Python专家和培训师,他们的用语亲切且组织良好的文章已经指导许多编程者精通这种语言。   对本书第一版的褒奖:   “这本书最好之处在于作者在提供有用的实例与详细解释说明之间取得近乎完美的平衡。无论你是有经验的计算机程序员还是初学者,这本书对于学习Python语言都是非常适合的。”    ———Andrew Morrison, CedarLug      《学习Python》(第二版)给程序员提供了一个学习Python和面向对象编程的综合学习工具。它根据1999年该书第一版发布以来语言的大量变化做了更新。本书介绍了最近发布的Python2.3的基本要素并涵盖了新的特性,如列表内涵,嵌套作用域和迭代器/产生器。   除了语言特性,《学习Python》(第二版)还为初级程序员提供了新的内容,包括新的面向对象编程回顾,动态类型,新的关于编程起步和配置选项的讨论,新的关于文档的内容等等。全书用新的实例使得语言特性的应用更加具体。   《学习Python》(第二版)首先给出了理解和构造Python程序必需的所有信息,包括类型、运算符、表达式、类、函数、模块和异常。然后,作者给出了更高级的内容,通过真实的应用和可用扩展库说明如何用Python完成一般的任务。全书提供了练习以检验自己的新技能。   《学习Python》(第二版)是本可灵活选读的图书,它让读者能够集中深入Python语言的核心。随着通读全书,你将获得对Python深入而完整的理解,这将帮助你自己开发大型的应用程序。本书适合于任何不仅仅想停留于了解Python而且想更好的掌握它的人。   

目录

preface

part i. getting started

1. a python q&a session

why do people use python?

is python a scripting language?

okay, but what's the downside?

who uses python today?

what can i do with python?

what are python's technical strengths?

how does python stack up to language x?

2. how python runs programs

introducing the python interpreter

program execution

execution model variations

3. how you run programs

interactive coding

system command lines and files

clicking windows file icons

module imports and reloads

the idle user interface

.other ides

embedding calls

frozen binary executables

text editor launch options

other launch options

future possibilities?

which option should i use?

part i exercises

part ii. types and operations

4. numbers

python program structure

why use built-in types?

numbers

python expression operators

numbers in action

the dynamic typing interlude

5. strings

string literals

strings in action

string formatting

string methods

general type categories

6. lists and dictionaries

lists

lists in action

dictionaries

dictionaries in action

7. tuples, files, and everything else

tuples

files

type categories revisited

object generality

references versus copies

comparisons, equality, and truth

python's type hierarchies

other types in python

built-in type gotchas

part ii exercises

part iii. statements and syntax

8. assignment, expressions, and print

assignment statements

expression statements

print statements

9. if tests

if statements

python syntax rules

truth tests

10. while and for loops

while loops

break, continue, pass, and the loop else

for loops

loop variations

11. documenting python code

the python documentation interlude

common coding gotchas

part iii exercises

part iv. functions

12. function basics

why use functions?

coding functions

a first example: definitions and calls

a second example: intersecting sequences

13. scopes and arguments

scope rules

the global statement

scopes and nested functions

passing arguments

special argument matching modes

14. advanced function topics

anonymous functions: ]ambda

applying functions to arguments

mapping functions over sequences

functional programming tools

list comprehensions

generators and iterators

function design concepts

function gotchas

part iv exercises

part v. modules

15. modules: the big picture

why use modules?

python program architecture

how imports work

16. module coding basics

module creation

module usage

module namespaces

reloading modules

17. module packages

package import basics

package import example

why use package imports?

a tale of three systems

18. advanced module topics

data hiding in modules

enabling future language features

mixed usage modes: __name__ and __main_.

changing the module search path

the import as extension

module design concepts

module gotchas

part v exercises

part vi. classes and oop

19. oop: the big picture

why use classes?

oop from 30,000 feet

20. class coding basics

classes generate multiple instance objects

classes are customized by inheritance

classes canintercept python operators

21. class coding details

the class statement

methods

inheritance

operator overloading

namespaces: the whole story

22. designing with classes

python and oop

classes as records

oop and inheritance: "is-a' relationships

oop and composition: "has-a" relationships

oop and delegation

multiple inheritance

classes are objects: generic object factories

methods are objects: bound or unbound

documentation strings revisited

classes versus modules

23. advanced class topics

extending built-in types

pseudo-private class attributes

"new style" classes in python 2.2

class gotchas

part vi exercises

part vii. exceptions and tools

24. exception basics

why use exceptions?

exception handling: the short story

the try/except/else statement

the try/finally statement

the raise statement

the assert statement

25. exception objects

string-based exceptions

class-based exceptions

general raise statement forms

26. oesigning with exceptions

nesting exception handlers

exception idioms

exception design tips

exception gotchas

core language summary

part vii exercises

part viii. the outer layers

27. common tasks in python

conversions, numbers, and comparisons

manipulating strings

data structure manipulations

manipulating files and directories

intemet-related modules

executing programs

debugging, testing, timing, profiling

exercises

28. frameworks

an automated complaint system

interfacing with com: cheap public relations

a tkinter-based gui editor for managing form data

jython: the felicitous union of python and java

exercises

29. python resources

layers of community

the process

services and products

the legal framework: the python software foundation

software

popular third-'party software

web application frameworks

tools for python developers

part ix. appendixes

a. installation and configuration

b. solutions to exercises

index


已确认勘误

次印刷

页码 勘误内容 提交人 修订印次

Learning Python = 学习Python / 第二版.
    • 名称
    • 类型
    • 大小

    光盘服务联系方式: 020-38250260    客服QQ:4006604884

    意见反馈

    14:15

    关闭

    云图客服:

    尊敬的用户,您好!您有任何提议或者建议都可以在此提出来,我们会谦虚地接受任何意见。

    或者您是想咨询:

    用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问

    Video Player
    ×
    Audio Player
    ×
    pdf Player
    ×
    Current View

    看过该图书的还喜欢

    some pictures

    解忧杂货店

    东野圭吾 (作者), 李盈春 (译者)

    loading icon