Learning Python, 5th Edition 读书笔记 1

发布时间:2019-06-20 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Learning Python, 5th Edition 读书笔记 1脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

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.

脚本宝典总结

以上是脚本宝典为你收集整理的Learning Python, 5th Edition 读书笔记 1全部内容,希望文章能够帮你解决Learning Python, 5th Edition 读书笔记 1所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。