RT 。
e.g.
def add_url_rule(self, rule, endpoint=None, view_func=None, **options): Basically this example:: @app.route('/') def index(): pass Is equivalent to the following:: def index(): pass app.add_url_rule('/', 'index', index) endpoint 作为 url -> endpoint -> func 中间的一层,并没有找到什么特别大的意义?如果说是为了在 url 上进行弄上一层 "namespace" , 例如 /admin/hello 和 /user/hello 都绑住各自目录下 一个叫做 hello 的函数。那为什么不直接 通过 url -> func 的方式将 /admin/hello 和 admin 下的 hello 函数绑起来, /user/hello 和 user 下的 hello 函数绑起来?
也许上面的描述不太清楚。但是总的意思就是, endpoint 的意义到底是什么?
