V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Tornado Documentation
http://www.v2ex.com/tornado/
Tornado on GitHub
https://github.com/facebook/tornado/
Tornado Gists
http://tornadogists.org/
mywaiting
V2EX  ›  Tornado

Tornado V4.5 release

  •  
  •   mywaiting · 2017-03-28 00:33:42 +08:00 · 9815 次点击
    这是一个创建于 2557 天前的主题,其中的信息可能已经有所发展或是发生改变。
    记得先前有个 issue 提及到 routing 的问题的,深夜翻一下 Tornado 的代码,刚刚好遇上 update 到 v4.5

    多了这么一个 routing 的实现,终于有了一个官方点的稍微好看优雅点的方式去组织 Tornado 的 Application 和 Handler 了

    直接看代码吧 https://github.com/tornadoweb/tornado/blob/master/tornado/routing.py 官方的文档都还没有更新

    Tornado 的代码写得挺优雅的,很适合围观
    6 条回复    2017-03-28 09:37:54 +08:00
    mywaiting
        1
    mywaiting  
    OP
       2017-03-28 00:55:12 +08:00   ❤️ 1
    翻到了这个 issue 的开始,不得不感叹这开源的协作

    https://github.com/tornadoweb/tornado/pull/1806
    lzjun
        2
    lzjun  
       2017-03-28 01:08:11 +08:00
    routing 有什么应用场景
    gladuo
        3
    gladuo  
       2017-03-28 01:19:20 +08:00
    233
    binux
        4
    binux  
       2017-03-28 03:11:59 +08:00
    mywaiting
        5
    mywaiting  
    OP
       2017-03-28 08:56:25 +08:00
    @binux 哈哈,我有个 project 也抄袭了你这样的组织 handlers 的方式

    也不是必要不必要的问题吧,就是折腾吧, tornado.web.Application.add_handlers 确实可以更加强大一点的

    不过还是很感叹,从 tornado v1.0 开始用过来,当年的第一个版本才多少点的代码,现在 v4.5 的功能多到眼花缭乱,看都看不过来了
    gulu
        6
    gulu  
       2017-03-28 09:37:54 +08:00 via Android
    没有的时候嫌它没有,自己实现,现在官方有了,但已经习惯了自己的了😂
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3647 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:44 · PVG 18:44 · LAX 03:44 · JFK 06:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.