会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
JohnYang
定心者,勇猛精进,终获证果(https://johnsite.157489.xyz/)
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
27
28
29
30
31
2019年2月7日
python中__str__与__repr__
摘要: (1)背景 python中,对于类(自定义类)的实例对象的默认显示既没有太大用处,也不美观。比如: 1 class adder: 2 def __init__(self,value=0): 3 self.data=value #初始化数据 4 def __add__(self,other): 5 s
阅读全文
posted @ 2019-02-07 14:27 JohnYang819
阅读(444)
评论(0)
推荐(0)
上一页
1
···
27
28
29
30
31