小编guo*_*iao的帖子

python位置args和关键字args

我正在阅读mercurial的源代码,并在commands.py中找到了这样的函数def:

def import_(ui, repo, patch1=None, *patches, **opts):
    ...
Run Code Online (Sandbox Code Playgroud)

在python中,postional args必须放在关键字args之前.但这里patch1是一个关键字参数,后跟一个位置参数*patches.为什么这样好?

python function func

9
推荐指数
1
解决办法
6886
查看次数

django日历应用程序?

大家.我正在为我的公司开发一个带django的会议室预订系统.我需要一个日历组件在这个系统中.我希望在每日,每周和每月视图中查看我的活动,就像Google日历一样.现有的应用程序对我有用吗?

django calendar

2
推荐指数
1
解决办法
3882
查看次数

标签 统计

calendar ×1

django ×1

func ×1

function ×1

python ×1