16

作者: 人工智能第三版 | 来源:发表于2018-08-06 16:55 被阅读7次

    0 目的

    python decorator

    1 设备

    HP+windows7

    2 步骤

    def f(x):

        def g():   

            x()     

        return g   

    @f             

    def h1():       

        print "H1" 

    h1()           

    3 原理

    h1()

    @f

    x <- h1

    g

    相关文章

      网友评论

          本文标题:16

          本文链接:https://www.haomeiwen.com/subject/cmygvftx.html