Differences between revisions 16 and 29 (spanning 13 versions)
Revision 16 as of 2007-01-14 16:53:32
Size: 7626
Editor: swordsp
Comment:
Revision 29 as of 2007-01-14 18:52:40
Size: 10212
Editor: swordsp
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 8: Line 9:
对于一种编程语言来说,语法格式是其最直观的表现,各种类库的 API 是其最直接的应用。
但在水面之下,语言的基础设施、模型、原理以及背后的设计思想才是其最本质的部分,也是一种语言真正区别于另一种的所在。
此条目关注 Python 本身语言、语法的研究和探讨,收集整理相关的文档和心得(尤其是中文资料)。
如无特别注明,均以 CPython 实现为准。
 . 对于一种编程语言来说,语法格式是其最直观的表现,各种类库的 API 是其最直接的应用。
 . 但在水面之下,语言的基础设施、模型、原理以及背后的设计思想才是其最本质的部分,也是一种语言真正区别于另一种的所在。
 . 此条目关注 Python 本身语言、语法的研究和探讨,收集整理相关的文档和心得(尤其是中文资料)。
 . 如无特别注明,均以 CPython 实现为准。
Line 52: Line 53:
==== Iterator 和 Generator ==== ==== Iterator、Generator 和 yield ====
 * [http://www.ibm.com/developerworks/cn/linux/sdk/python/charm-20/index.html 可爱的 Python: 迭代器和简单生成器——Python 2.2 中的新型构造]
 * [http://www.ibm.com/developerworks/cn/linux/sdk/python/charm-25/index.html 可爱的 Python: 用 Python 生成器实现“轻便线程”——微线程的力量]
 * [http://www.ibm.com/developerworks/cn/linux/sdk/python/charm-26/index.html 可爱的 Python: 基于生成器的状态机——用基于生成器的状态机和协同程序增加效率]
 . 以上三篇均为 David Mertz 的 developerWorks Python 专栏文章
Line 54: Line 60:
==== Decorator ====
 * [http://www.python.org/dev/peps/pep-0318/ PEP318 : Decorators for Functions and Methods]
  * [:WeiZhong/DecoratorsInPython24:Python2.4中的新东西(1):函数和方法的修饰符] by WeiZhong
  * [http://blog.donews.com/limodou/archive/2004/12/19/207521.aspx decorator的使用] by limodou
  * [http://www.donews.net/limodou/archive/2004/12/20/208356.aspx Decorator 应用:使用decorator的线程同步] by limodou
  * [http://blog.donews.com/limodou/archive/2004/12/31/221653.aspx 关于阅读《Doing abstract methods with decorators》的思考] by limodou
Line 61: Line 61:
==== yield ====
Line 64: Line 63:
 . 可与[http://www.ibm.com/developerworks/cn/linux/sdk/python/charm-25/index.html 《用 Python 生成器实现“轻便线程”》]对照,加强的 yield 语法带来了更强大的力量和更灵活的运用

==== Decorator ====
 * [wiki:peps/pep-0318/ PEP 318 : Decorators for Functions and Methods]
 * [:WeiZhong/DecoratorsInPython24:Python2.4中的新东西(1):函数和方法的修饰符] by WeiZhong
 * [http://blog.donews.com/limodou/archive/2004/12/19/207521.aspx decorator的使用] by limodou
 * [http://www.donews.net/limodou/archive/2004/12/20/208356.aspx Decorator 应用:使用decorator的线程同步] by limodou
 * [http://blog.donews.com/limodou/archive/2004/12/31/221653.aspx 关于阅读《Doing abstract methods with decorators》的思考] by limodou
Line 69: Line 76:
==== 概述 ==== ==== New-style Classes 概述 ====
Line 75: Line 82:
 * 两篇系统讲解的精彩文档  * [http://www.python.org/2.2.3/descrintro.html Unifying types and classes] -- Python 之父 Guido 关于 New-style Classes 的权威解说
 . limodou 的节译+笔记系列 blog 文章:
  * [http://blog.donews.com/limodou/archive/2004/12/29/219713.aspx New Style Class学习笔记(一) -- 关于OO的思考]
  * [http://blog.donews.com/limodou/archive/2004/12/31/221893.aspx New Style Class学习笔记(二) -- Unifying types and classes -- Introduction]
  * [http://blog.donews.com/limodou/archive/2004/12/31/222240.aspx New Style Class学习笔记(三) -- Unifying types and classes -- Subclassing built-in types]
  * [http://blog.donews.com/limodou/archive/2005/01/01/223160.aspx New Style Class学习笔记(四) -- Unifying types and classes -- Built-in types as factory functions]
  * [http://blog.donews.com/limodou/archive/2005/01/02/223720.aspx New Style Class学习笔记(五) -- Unifying types and classes -- Introspecting instances of built-in types]
  * [http://blog.donews.com/limodou/archive/2005/01/03/224543.aspx New Style Class学习笔记(六) -- Unifying types and classes -- Static methods and class methods]
  * [http://blog.donews.com/limodou/archive/2005/01/03/224898.aspx New Style Class学习笔记(七) -- Unifying types and classes -- Properties: attributes managed by get/set methods]
  * [http://blog.donews.com/limodou/archive/2005/01/06/227658.aspx New Style Class学习笔记(八) -- Unifying types and classes -- Method resolution order]
  * [http://blog.donews.com/limodou/archive/2005/01/06/227676.aspx New Style Class学习笔记(九) -- Unifying types and classes -- Order Disagreements and Other Anomalies]

 * 两篇系统讲解的文档
Line 81: Line 100:
 * [http://blog.csdn.net/jrgao/archive/2004/03/04/22248.aspx python的对象与名字绑定]、[http://blog.csdn.net/dreamingk/archive/2004/07/26/51658.aspx 对于"python的对象与名字绑定"一文错误的纠正!]
  * [http://blog.donews.com/limodou/archive/2005/07/09/460187.aspx 关于Python对象及名字绑定] -- limodou 的补充感想
 * [:MicroProj/2005-07-10:《Python的对象与名字绑定》及后续讨论] -- jrgao、[:天成:DreamingK]、limodou
Line 111: Line 129:
 * [http://www.ibm.com/developerworks/cn/linux/sdk/python/python-8/index.html 可爱的 Python:动态重新装入——在长期运行的进程中动态重新装入模块]
 . David Mertz 的 developerWorks Python 专栏文章
Line 126: Line 146:
 * http://www.voidspace.org.uk/python/index.shtml
 * [http://www.ibm.com/developerworks/cn/linux/theme/special/index.html#python IBM developerWorks 的 Python 专栏]
Line 128: Line 150:
 * http://www.voidspace.org.uk/python/index.shtml

Python 语言研究 ::-- ["swordsp"] [DateTime] TableOfContents

Include(swordsp/COTW/Header)

概述

  • 对于一种编程语言来说,语法格式是其最直观的表现,各种类库的 API 是其最直接的应用。
  • 但在水面之下,语言的基础设施、模型、原理以及背后的设计思想才是其最本质的部分,也是一种语言真正区别于另一种的所在。
  • 此条目关注 Python 本身语言、语法的研究和探讨,收集整理相关的文档和心得(尤其是中文资料)。
  • 如无特别注明,均以 CPython 实现为准。

系统学习

  • 参见[:PyBooks:Python 图书概览]

  • 对于语言特性的学习来说,特别推荐以下几本
    • 《Python Tutorial》(最新版本2.5) -- 最新,最权威,公开文档
    • 《A Byte of Python》 -- 简洁明了,浅显易懂,公开文档
    • 《Learning Python》(第二版) -- 最细致,最深入
    • 《Text Process in Python》的附录A :[:TPiP/AppendixA:python精要]

    • “对 python 的超精简的但绝不失深度的介绍” -- from 译者 HuangYi

语言进化

专题剖析

内置类型和操作

语句和语法

自省

Iterator、Generator 和 yield

Decorator

with

名字空间与对象模型

New-style Classes 概述

Metaclass

Descriptor

Magic Methods

模块导入机制

异常机制

其它

参考

PythonLanguage (last edited 2009-12-25 07:15:24 by localhost)