会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
天子骄龙
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
164
下一页
2024年9月20日
python--多态
摘要: 多态:对于父类的一个方法,在不同的子类上有不同体现
阅读全文
posted @ 2024-09-20 14:27 天子骄龙
阅读(23)
评论(0)
推荐(0)
2024年9月18日
python-逻辑运算符对应的函数
摘要: __eq__(self, other):用于 == 操作符__ne__(self, other):用于 != 操作符__lt__(self, other):用于 < 操作符__le__(self, other):用于 <= 操作符__gt__(self, other):用于 > 操作符__ge__(
阅读全文
posted @ 2024-09-18 14:47 天子骄龙
阅读(27)
评论(0)
推荐(0)
python-算数运算符对应的函数
摘要: __add__(self, other): 用于 + 操作符__sub__(self, other): 用于 - 操作符__mul__(self, other): 用于 * 操作符__truediv__(self, other): 用于 / 操作符__floordiv__(self, other):
阅读全文
posted @ 2024-09-18 14:41 天子骄龙
阅读(30)
评论(0)
推荐(0)
2024年9月17日
python- +和+=的区别
摘要: 区别: +使用__add__函数,返回新地址 += 可变数据时使用__iadd__函数 ,返回原地址;不可变数据用__add__函数 不可变数据 #不可变数据 +和+= 都用__add__函数 i=10 i=i+2 print(id(i)) i+=2 print(id(i)) 可变数据 # 可变数据
阅读全文
posted @ 2024-09-17 11:09 天子骄龙
阅读(73)
评论(0)
推荐(0)
2024年9月16日
python- ==比较的原则eq函数
摘要: 当类中没有__eq__函数时,根据地址比较 class Vector: def __init__(self, x, y): self.x = x self.y = y pos1=Vector(1,1) pos2=Vector(1,1) print(pos2==pos1) 自定义Vector类中没有_
阅读全文
posted @ 2024-09-16 06:50 天子骄龙
阅读(86)
评论(0)
推荐(0)
python-super函数
摘要: 单继承 在单继承中super主要是用来调用父类的方法的 class A: def __init__(self): self.n = 2 def add(self, m): print('self is {0} @A.add'.format(self)) self.n += m class B(A):
阅读全文
posted @ 2024-09-16 06:02 天子骄龙
阅读(40)
评论(0)
推荐(0)
2024年9月15日
苏泊尔吸尘器
摘要: aa
阅读全文
posted @ 2024-09-15 19:58 天子骄龙
阅读(21)
评论(0)
推荐(0)
2024年9月14日
格力-空调遥控器说明书
摘要: 客厅柜机遥控器 主卧空调遥控器 aa
阅读全文
posted @ 2024-09-14 17:22 天子骄龙
阅读(2713)
评论(0)
推荐(0)
2024年9月11日
古墓丽影暗影-毒材料商人位置
摘要: aa
阅读全文
posted @ 2024-09-11 10:19 天子骄龙
阅读(96)
评论(0)
推荐(0)
2024年9月3日
python-__dict__对象属性字典
摘要: __dict__是用来存储对象属性的一个字典,其键为属性名,值为属性的值 class people: def __init__(self, id=0,name="",age=0): #初始化函数 #id是创建对象时要输入的参数 self.id = id #self.id 是对象属性 self.nam
阅读全文
posted @ 2024-09-03 10:56 天子骄龙
阅读(28)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
164
下一页
公告