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

上一篇: Android数据库在每次启动应用程序时重新创建

下一篇: 在Django的Kwargs