停止使用非版本控制的可执行代码

https://www.pydanny.com/using-executable-code-outside-version-control.html

开发世界现在有很多反设计模式的开发方式,比如使用可执行代码作为配置文件。

在Python世界里面,你很可能碰到过类似下面的代码:

# 警告:这是反模式代码!
try:
    from .local_settings import *
except ImportError:
    pass

猜你喜欢

转载自www.cnblogs.com/thomaszdxsn/p/stop-using-executable-code-outside-version-control.html