def create_app(config_name=None):
    '程序工厂：创建 Flask 程序，加载配置，注册扩展、蓝图等程序包'
    if (config_name is None):
        config_name = os.getenv('FLASK_CONFIG', 'development')
    app = Flask('telechat')
    app.config.from_object(config[config_name])
    register_extensions(app)
    register_blueprints(app)
    register_errors(app)
    register_commands(app)
    return app
程序工厂：创建 Flask 程序，加载配置，注册扩展、蓝图等程序包
def create_app(config_name=None):
    
    if (config_name is None):
        config_name = os.getenv('FLASK_CONFIG', 'development')
    app = Flask('telechat')
    app.config.from_object(config[config_name])
    register_extensions(app)
    register_blueprints(app)
    register_errors(app)
    register_commands(app)
    return app