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

请教关于 python 的 abc

  •  
  •   geeti · Jun 12, 2016 · 3319 views
    This topic created in 3765 days ago, the information mentioned may be changed or developed.
    用 abc 的 metaclass , abstractmethod 的意义是什么?
    如果不用 abc ,子类 override 基类有什么不妥么?
    2 replies  •  2016-06-15 10:20:16 +08:00
    introom
        1
    introom  
       Jun 12, 2016 via Android
    abstractmethod 类似 java 中的 abstract, 类不能实例化。


    没啥不妥,问题是你先把文档或者源码看了,你似乎不懂 abc 是干什么的。

    Lib/abc.py 行数不多,扫一眼就明白了。
    ZoomQuiet
        2
    ZoomQuiet  
       Jun 15, 2016
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2240 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 04:23 · PVG 12:23 · LAX 21:23 · JFK 00:23
    ♥ Do have faith in what you're doing.