上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页
摘要: # __author: "ZXYang"# date: 2020/5/11# import threading# import time### class MyThread(threading.Thread):## def __init__(self, num):# threading.Thread 阅读全文
posted @ 2020-12-20 16:25 zxy_ang 阅读(73) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/5/11import threadingimport timedef mu(func): # print(threading.current_thread()) for i in range(2): print('Begin1 %s. 阅读全文
posted @ 2020-12-20 16:23 zxy_ang 阅读(66) 评论(0) 推荐(0)
摘要: 以下为复制内容: 1. https://zhuanlan.zhihu.com/p/31150408 2. https://blog.csdn.net/weixin_39363245/article/details/100740841 Python在内存中存储了每个对象的引用计数(reference 阅读全文
posted @ 2020-12-19 23:39 zxy_ang 阅读(45) 评论(0) 推荐(0)
摘要: 一 常用快捷键 格式化: ctrl+alt+L 编辑类:Ctrl + D 复制选定的区域或行Ctrl + Y 删除选定的行Ctrl + Alt + L 代码格式化Ctrl + Alt + O 优化导入(去掉用不到的包导入)Ctrl + 鼠标 简介/进入代码定义 Ctrl + / 行注释 、取消注释 阅读全文
posted @ 2020-12-19 20:59 zxy_ang 阅读(191) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/4/7# s1 = [1, 2, 3, 'aa', 'bb', [5, 6]]# s2 = s1.copy()## # s2[0] = 11# s2[5][1] = 66 # 有列表/字典,影响原有数据 (影响第一层) 》 浅拷贝# 阅读全文
posted @ 2020-12-19 20:33 zxy_ang 阅读(90) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/12/15"""hasattr(): 判断对象是否有某个属性getattr(): 获取对象属性setattr(): 给对象添加属性delattr(): 删除对象属性"""class Fun(object): def __init__( 阅读全文
posted @ 2020-12-15 23:29 zxy_ang 阅读(184) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/12/15class Fun(object): def __init__(self, name, age, money): self.name = name self.age = age self.money = money def 阅读全文
posted @ 2020-12-15 22:42 zxy_ang 阅读(119) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/12/15"""__setattr__:给对象设置属性时自动调用该方法封装:【 限制属性类型的添加 】"""class Fun(object): __slots__ = ['name', 'age', 'gender'] def __ 阅读全文
posted @ 2020-12-15 21:47 zxy_ang 阅读(169) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/12/15"""以下方法何时触发:__new__:创建对象时触发;__str__:print或str函数触发__repr__:控制台或者repr内置函数触发__call__:对象()调用时触发""" 阅读全文
posted @ 2020-12-15 20:30 zxy_ang 阅读(78) 评论(0) 推荐(0)
摘要: # __author: "ZXYang"# date: 2020/5/31# import pymysql## conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='Zz0103', db='test02', 阅读全文
posted @ 2020-12-15 20:16 zxy_ang 阅读(115) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页