0610
https://home.cnblogs.com/u/huilianglog (自己的博客)
递归:
def recur_fibo(n):
"""递归函数
输出斐波那契数列"""
if n <= 1:
return n
else:
return (recur_fibo(n - 1) + recur_fibo(n - 2))
# 获取用户输入
nterms = int(input("您要输出几项? "))
# 检查输入的数字是否正确
if nterms <= 0:
print("输入正数")
else:
print("斐波那契数列:")
for i in range(nterms):
print(recur_fibo(i))
装饰器——日志
from functools import wraps
def logit(func):
@wraps(func)
def with_logging(*args, **kwargs):
print(func.__name__ + " was called")
return func(*args, **kwargs)
return with_logging
@logit
def addition_func(x):
"""Do some math."""
return x + x
result = addition_func(4)
# Output: addition_func was called
常用装饰器(https://www.jb51.net/article/210930.htm)
skip()
unittest https://blog.csdn.net/heye13/article/details/81627538
jmeter实现接口关联
1、正则
access_token”:“(.+?)","expire
()括起来的部分就是要提取的。.代表任意字符,+表示一次或多次,*代表出现任意次。
${ access_token}
2、json提取
格式:$. 节点名称 根节点用 “.” 表示
$.tag.name
postman实现接口关联(https://www.cnblogs.com/ss0202go/p/10735069.html)
登录接口(https://blog.csdn.net/liaowenxiong/article/details/108368591)
sql语句(https://blog.csdn.net/weixin_42669555/article/details/88879731)