推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
codists
V2EX  ›  Python

翻译:《实用的 Python 编程》05_00_Overview

  •  
  •   codists ·
    codists · Mar 11, 2021 · 1905 views
    This topic created in 1913 days ago, the information mentioned may be changed or developed.

    5. Python 对象的内部工作原理

    本节介绍 Python 对象的内部工作原理。来自其它语言的程序员通常会发现 Python 的类概念缺乏特性。例如,没有访问控制( access-control )的概念(如:private,protected ),self 参数让人感觉很奇怪,并且,坦白地说,使用对象有时候让人感到“一切都是开放的”。虽然某种程度上来说也许是这样,但是我们要了解其工作原理,以及一些常见的编程习惯,以便更好的封装对象的内部。

    虽然没有必要担心内部细节会影响效率,但是,大多数 Python 程序员对类的工作原理都有基本了解。这就是为什么要介绍 Python 对象的内部工作原理的原因。

    注:完整翻译见 https://github.com/codists/practical-python-zh

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   925 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:49 · PVG 06:49 · LAX 15:49 · JFK 18:49
    ♥ Do have faith in what you're doing.