> (Actually I'm not sure that 'callable decorator' is the right term
> here, but I can't think of a better one. Is there a canonical name for
> this sort of thing?)
PEP 318 just says "function that returns a decorator" (which is a bit of
a mouthful)
"The current syntax also allows decorator declarations to call a
function that returns a decorator:"
...
"The rationale for having a function that returns a decorator is that
the part after the @ sign can be considered to be an expression (though
syntactically restricted to just a function), and whatever that
expression returns is called."
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment