摘要: 代码1:class cla: def __init__(self): #raise NameError # 抛出异常 print(r) cla() 运行截图: 阅读全文
posted @ 2023-08-07 10:54 人生努力努力努力就好 阅读(17) 评论(0) 推荐(0)
摘要: import re # Python re.compile的性能优势 # 相对于使用re.match和re.search等函数直接进行匹配,使用Python re.compile的优化方式可以带来更好的性能。 # 由于re.compile将正则表达式转化为一种优化过的数据结构,它可以更快地进行匹配操 阅读全文
posted @ 2023-08-07 10:21 人生努力努力努力就好 阅读(84) 评论(0) 推荐(0)