Kwargs in Django
What are Kwarg!!??
I have been going through a tutorial in django, trying to learn the language, and I stumbled on this.
I would really appreciate if some can post / point to a simple example that would help grasp why and how this is used.
Based on Keyword arguments' documentation pointed out by @Ignacio Vazquez-Abrams
**kwargs allows you to handle named arguments that you have not defined in advance .
In a function call, keyword arguments must follow positional arguments .
All the keyword arguments passed must match one of the arguments accepted by the function (eg actor is not a valid argument for the parrot function), and their order is not important .
链接地址: http://www.djcxy.com/p/5482.html下一篇: 在Django的Kwargs