资讯专栏INFORMATION COLUMN

Learning Python, 5th Edition 读书笔记 1

YPHP / 1493人阅读

How Python Runs Programs

Process: source code -> compiled byte code -> PVM (Python Virtual Machine) runs byte code
Performance loss: compilation + extra work in running virtual machine
Implementation variations: CPython (the standard); Jython; IronPython; Stackless Python; PyPy (with JIT compiler).
Optimization: Cython (Python/C hybrid)
Frozen binary: PyInstaller

Python Conceptual Hierarchy

programs > modules > statements > expressions > objects

Core Data Types

Number (int, float, complex, decimal, fraction, boolean)

String

List

Dictionary

Tuple

File

Set

None

Program units: function, module, class

Typing

Variable is created during value assignment. Variable itself has no type information, it simply points to an object and the object can be any type. Python"s typing is:

Dynamic: type is determined automatically at runtime, not declared

Strong: every object has two header fields: type designator; reference counter.

Objects are garbage-collected, programmer doesn"t have to free them.

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/43157.html

相关文章

  • 各种API+教程+练习

    摘要:做一个搬运工,希望自己能努力学习,也希望大神们的东西能让更多的人看到不断更新更新日志新增了网络安全分类,整理了排版布局新增了的链接,将一些杂七杂八的东西弄到了一篇新文章上了,叫做积累与杂货铺一以及相关教程的规范与相关中文学习大本营中文文档简 做一个搬运工,希望自己能努力学习,也希望大神们的东西能让更多的人看到 不断更新 更新日志:2017.10.13 新增了网络安全分类,整理了排版布局...

    saucxs 评论0 收藏0
  • 各种API+教程+练习

    摘要:做一个搬运工,希望自己能努力学习,也希望大神们的东西能让更多的人看到不断更新更新日志新增了网络安全分类,整理了排版布局新增了的链接,将一些杂七杂八的东西弄到了一篇新文章上了,叫做积累与杂货铺一以及相关教程的规范与相关中文学习大本营中文文档简 做一个搬运工,希望自己能努力学习,也希望大神们的东西能让更多的人看到 不断更新 更新日志:2017.10.13 新增了网络安全分类,整理了排版布局...

    20171112 评论0 收藏0
  • 高程读书笔记 第六章 面向对象程序设计

    摘要:创建一个新对象将构造函数的作用域赋给新对象因此就指向了这个新对象执行构造函数中的代码为这个新对象添加属性返回新对象。 本章内容 理解对象属性 理解并创建对象 理解继承 ECMA-262把对象定义为:无序属性的集合,其属性可以包含基本值、对象或者函数 理解对象 创建对象 创建自定义对象的最简单方式就是创建一个Object的实例,再为它添加属性和方法。 var person = new...

    468122151 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<