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

何时该抽象成工厂类?

  •  
  •   firejoke · Mar 7, 2019 · 1943 views
    This topic created in 2769 days ago, the information mentioned may be changed or developed.

    最近写一个内部可视化部署工具,
    上一版本写了个网卡类,
    内部为 redhat 系和 debian 系分别写了实现逻辑,
    马上要做下一版本, 功能更复杂一点,
    整理上一版的时候, 看着两百来行的一个类, 感觉是不是要按 redhat 系和 debian 系分成两个子类,
    但是如果这样做, 那在实例的时候, 就还要去判断系统类型,
    拿不准主意, 希望大家能集思广益一下, 类似于这样的情况, 应该怎么做?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1106 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 17:00 · PVG 01:00 · LAX 10:00 · JFK 13:00
    ♥ Do have faith in what you're doing.