Fork me on GitHub
摘要: 定义:Python中,对日期和时间的操作,主要使用这3个内置模块: datetime 、 time 和 calendar1、某个函数执行大概耗费了多少时间,就可以使用time.time()来做。获取时间差 def fun1(): pass import time before=time.time() 阅读全文
posted @ 2021-12-29 18:54 橘子偏爱橙子 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 一、快速安装 执行下面这些命令进行安装 PySnooper $ python3 -m pip install pysnoopere 二、快速使用 1、 定义了一个 demo_func 的函数,在里面生成一个 profile 的字典,更新字典值,最后返回 import pysnooper @pysno 阅读全文
posted @ 2021-12-29 15:05 橘子偏爱橙子 阅读(59) 评论(0) 推荐(0) 编辑