我的观点中有类似下面的设置:
@app.route("/test") def test(): ... @app.route("/<to>") def page(to): ...
在访问"/ test"url时,似乎总是会调用示例中的函数测试.这也是我想要的.但我在文档中找不到这种行为.这样定义的名称总是优先于变量吗?或者是重要的定义的顺序?我能否以任何方式确定优先级,以确保将来不会破坏?
python flask python-2.7
flask ×1
python ×1
python-2.7 ×1