脚本宝典收集整理的这篇文章主要介绍了

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群277859234一起讨论学习。如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典网站推荐给程序员好友。 本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。

80%的人都看过