Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Decorator PEP elaborations

Guido van Rossumgvanrossum at gmail.com
Tue Sep 14 02:12:55 CEST 2004


No PEP text from me, but:> If one of the authors gets a chance, it would be nice to document the> rationale for the order of application being inside-out instead of> top-down:>>     @deco3>     @deco2>     @deco1>     def myfunc(args):>         . . .This is the usual order for function-application. @f @g def foo() ->foo=f(g(foo).> Also, it would be nice to document the reasons for the approach to> argument handling:>>     @deco             # calls deco(f)>     @decomaker(arg)   # calls tmp(f) where tmp=decomaker(arg)The thing after the @ can be consered to be an expression (never mindthat syntactically you are restricted), and whatever that expressionreturns is called.-- --Guido van Rossum (home page:http://www.python.org/~guido/)


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp