Django Book 翻译
菜单>:
TOC
返回
原文:
So if youre one of those lazy programmers and you like keeping code particularly concise, you can take advantage of a built-in Python function called ``locals()`` . It returns a dictionary mapping all local variable names to their values. Thus, the preceding view could be rewritten like so:
翻译:
如果你是个喜欢偷懒的程序员并想让代码看起来更加简明,可以利用 Python 的内建函数 ``locals()`` 。它返回的字典对所有局部变量的名称与值进行映射。因此,前面的视图可以重写成下面这个样子:
备注:
译者: