自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

geyingqiの博客

正在通往 steins gate 的道路当中.......

  • 博客(3)
  • 收藏
  • 关注

原创 python catch exception and continue try block

python不支持如下方式try: do_sth1() do_sth2()except: #when catch except,continue run do_sth2()但是我们可以用如下方式来实现:funcs = do_sth1, do_sth2for func in funcs: try: func() except Exception

2016-04-12 10:09:26 1129

原创 python map

function with many argsmap函数,采用偏函数方式来为函数来添加多个参数map(functools.partial(self.english_recursive, branches=branches, index=index), next_level_knowledge_tags)input a list of function!话不多说,上代码def multiply(x)

2016-04-06 20:31:17 357

转载 一行python实现树形结构

定义使用内置的defaultdict 我们可以很容易的定义一个树形数据结构def tree(): return defaultdict(tree)example:json风格users = tree()users['harold']['username'] = 'bell'users['handler']['username'] = 'master'我们可以使用print(json.dumps(

2016-04-04 13:29:35 12796

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除