Dive Into Python的笔记(22)

>我来写笔记

按有用程度 按页码先后 最新笔记

  • impost
    第159页

    impost

    8.8. 挂起。 (更多)

    2011-04-04 09:42:09   回应

  • vvoody
    Further Reading

    vvoody

    Chapter 2: PEP 257 -- Docstring Conventions http://www.python.org/dev/peps/pep-0257/ Python Objects http://effbot.org/zone/python-objects.htm http://docs.python.org/reference/datamodel.html#objects Indentation http://docs.python.org/reference/lexical_analysis.html#indentation PEP 8 -- Style Guide for Python Code Import http://docs.python.org/reference/simple_stmts.html#import D... (更多)

    2012-04-22 21:05:40   回应

  • Jin
    第25页

    Jin (豆瓣:发现生活)

    与 C 一样, Python 使用 == 做比较, 使用 = 做赋值。 与 C 不一样, Python 不支持行内赋值, 所以不会出现想要进行比较却意外地出现赋值的情况。 Google一下『行内赋值』的意思,原来是这样的意思: 在 Python 中 /代码内容已省略/ 而在 c 中 /代码内容已省略/ 来源:http://wenda.tianya.cn/wenda/thread?tid=5a46d97ea3876239&hl;=zh-CN (更多)

    2012-03-22 10:24:47   5回应

  • gfreezy
    18.2. Using the timeit Module

    gfreezy

    >>> import timeit >>> t = timeit.Timer("soundex.soundex('Pilgrim')", ... "import soundex") >>> t.timeit() 8.21683733547 >>> t.repeat(3, 2000000) [16.48319309109, 16.46128984923, 16.44203948912] 1.The timeit module defines one class, Timer, which takes two arguments. Both arguments are strings. The first argu... (更多)

    2012-02-21 21:09:53   回应

  • gfreezy
    Standard input, output, and error

    gfreezy

    /代码内容已省略/ (更多)

    2012-02-21 20:39:07   回应

  • 白乌鸦
    第十一讲:exceptions、Debug

    白乌鸦 (Understand yourself)

    分类:可处理和不可处理 作用:人机交互,人录入错误则抛出异常 可分阶段处理错误 exception 和 assert 的区别 assert(断言):当满足限制条件时,才会执行codes用来告诉用户,你应该输出什么 assert距离 >>> mylist = ['item'] >>> assert len(mylist)>=1 >>> mylist.pop() >>> 'item' >>> assert len(mylist)>=1 >>> 抛出Asse... (更多)

    2011-12-08 14:07:02   回应

  • 白乌鸦
    第一讲:介绍

    白乌鸦 (Understand yourself)

    思想一:program即通过之流程表示程序 语言分类:低级——高级(指离底层的距离) 特定——广泛(指用途) 解释型(更便于调试)——编译型 python的静态语义中只有部分能检测出bug,它是高级、广泛、解释型语言 知识分类:陈述型、过程型 (更多)

    2011-12-08 13:39:38   回应

  • 白乌鸦
    第十七讲:简单的业务分析

    白乌鸦 (Understand yourself)

    1,分析业务,用不严格的描述得到严格的statement 2,创造计算模型 3,处理和开发随机性问题,Dealing with & eploiting randomness stochastic 4,理解大规模数据,Making sense of data 5,检测程序答案 /代码内容已省略/ (更多)

    2011-12-08 13:26:45   回应

  • 白乌鸦
    第十六讲:class及运算符重载

    白乌鸦 (Understand yourself)

    __init__:初始化 __str__(self):print(对象自身)后的打印值 __cmp__(sekf,other):和其他对象比较,描述比较内容;对象比较大小后输出1,0,-1 __eq__:和其它对象判别相等 隐藏数据!!只用特定的函数去访问数据 创建一个人的模拟: !!一定要记得在类方法中加上self 子类:可以隐藏和重载父类函数 /代码内容已省略/ (更多)

    2011-12-08 13:24:39   回应

  • 白乌鸦
    第十五讲:面向对象

    白乌鸦 (Understand yourself)

    不要用对象中的预定义方法之外的途径获取值!!!!! /代码内容已省略/ (更多)

    2011-12-08 13:23:59   回应

<前页 1 2 3 后页>

笔记是你写在书页留白边上的内容;是你阅读中的批注、摘抄及随感。

笔记必须是自己所写,不欢迎转载。摘抄原文的部分应该进行特殊标明。

Dive Into Python

>Dive Into Python