Head First Python ch_6 定制数据对象
2017-06-07 00:00
441 查看
1.使用dict()工厂函数或者使用{}可以创建一个空字典 2. 访问dict中的摸个value, 例如person['Name'] 3. 新建一个字典 d = {} , d= dict(), d['Name']='Mike', d = {'Name': 'John'} 4. 使用class建立一个类, 定义方法使用def关键字, __init__()初始化对象,每个方法函数签名中的第一个参数均为self 5. 类可以从零开始构建,也可以继承内置类或者其他类,扩展功能
相关文章推荐
- Head First Python(定制数据对象)
- HeadFirstPython---------(四)第六章(定制数据对象__打包代码与数据)
- [Head First Python]6. 定制数据对象:打包代码与数据
- 《head first python》——定制数据对象
- 【Head First Python-第六章-定制数据对象】学习笔记
- 《Head First Python》笔记 第六章 定制数据对象
- Head First Python 学习笔记-Chapter6:自定义数据对象:字典与类
- Head Frist Python 读书笔记 第六章 定制数据对象
- HeadFirstPython---------(二)第四章,持久存储,数据保存到文件
- Head First Python(管理你的数据)
- 《head first python》——理解数据:列表排序与集合
- Head First Python(推导数据)
- python系列学习四——定制数据对象
- 《Head_First_Python》 5推导数据
- 六、定制数据对象(Python的面向对象) ----- 打包代码与数据
- Python学习笔记_Chapter 6定制数据对象
- python定制数据对象
- 数据存储:从pickle到sqlite 《Head First Python》第九章
- 《Head First Programming》---python 4_文件和数组中的数据
- Python初入门(五)(Head First Python 第五章 处理数据)