V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2021-03-11 23:58:50 +08:00 · 1181 次点击
    这是一个创建于 1134 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5635 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 06:14 · PVG 14:14 · LAX 23:14 · JFK 02:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.