当前位置:网站首页>__ getitem__ And__ setitem__
__ getitem__ And__ setitem__
2022-06-28 03:25:00 【xx_ xjm】
here __setitem__ and __setattr__ A bit similar , One is in “ object . attribute ” Called when , One is in “ object [item]” Called when
And __setattr__ equally , To set properties, either self.__dict__, Either use object(self, key,value)
The difference between the two is , One is a. Property is called , One is a[ attribute ] Called when ,a Is an instance of any class

Reference from :(12 Bar message ) python in __setitem__() and __setattr__() The difference between _MY Qi The blog of -CSDN Blog
边栏推荐
- 简单ELK配置实现生产级别的日志采集和查询实践
- Windows 2003 64 bit system PHP running error: 1% is not a valid Win32 Application
- CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
- How to write concise code? (upper)
- 国泰君安证券靠谱吗?开证券账户安全吗?
- 文件的相对路径写法
- Apache - about Apache
- idea自动生成代码
- nn.Parameter和torch.nn.init系列函数给模型参数初始化
- 音视频技术开发周刊 | 251
猜你喜欢

Gateway microservice routing failed to load microservice static resources

導入Excel文件,解决跳過空白單元格不讀取,並且下標前移的問題,以及RETURN_BLANK_AS_NULL報紅

数字化时代,企业须做好用户信息安全

Single page application (SPA) hash route and historical API route

Artifact for converting pcap to JSON file: joy (installation)

业内首个!可运行在移动设备端的视频画质主观体验MOS分评估模型!

Brief history and future trend of codeless software

建立自己的网站(17)

The first in the industry! MOS sub evaluation model for subjective video quality experience that can run on mobile devices!

基于流的深度生成模型
随机推荐
没错,是水的一篇
A16z:元宇宙解锁游戏基础设施中的新机遇
Apache——阿帕奇简介
建立自己的网站(17)
Relative path writing of files
R语言惩罚逻辑回归、线性判别分析LDA、广义加性模型GAM、多元自适应回归样条MARS、KNN、二次判别分析QDA、决策树、随机森林、支持向量机SVM分类优质劣质葡萄酒十折交叉验证和ROC可视化
TensorRT 模型推理优化实现
Mysql database operation - stored procedure, view, transaction, index, database backup
Gateway microservice routing failed to load microservice static resources
腾讯游戏发布40多款产品与项目 其中12款为新游戏
Embedded DSP audio development
Reading makes people quiet
Ten years' experience of Software Engineer
[postgraduate] bit by bit
__getitem__和__setitem__
CURDATE()和NOW()区别
音视频技术开发周刊 | 251
[issue 21] face to face experience of golang engineer recruited by Zhihu Society
Notepad++--列编辑模式--用法/实例
Importer un fichier Excel, résoudre le problème de sauter les cellules vides et de ne pas lire, et avancer l'indice, et retourner Blank As NULL Red