推荐学习书目
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
buhuipao
V2EX  ›  Python

Python 里 super(Chicken, self) super(Chicken, cls) 区别

  •  
  •   buhuipao · Aug 15, 2017 · 2842 views
    This topic created in 3220 days ago, the information mentioned may be changed or developed.

    如题 Python 里 super(Chicken, self) super(Chicken, cls) 的区别,

    2 replies    2017-08-15 10:17:07 +08:00
    gimp
        1
    gimp  
       Aug 15, 2017
    这个看你传递的是什么

    可能这篇文章能帮到你,Super 返回的是 mro 列表中的下一个类

    https://blog.yasking.org/a/python-super.html
    buhuipao
        2
    buhuipao  
    OP
       Aug 15, 2017
    @gimp 首先谢谢!类和实例的 mro 都一样的吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   928 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:36 · PVG 05:36 · LAX 14:36 · JFK 17:36
    ♥ Do have faith in what you're doing.