Python notes: mutable and immutable
来源:互联网 发布:9001端口局域网可访问 编辑:程序博客网 时间:2024/06/05 10:47
1. Objects are Python's abstraction for data.
2. Every object has an identity, a type and a value.
3. identity: is, id().
4. type() returns an object's type.
5. Objects whose value can change are said to be mutable.
6. Objects whose value is unchangeable once they are created are called immutable.
7. The value of an immutable container object that contains a reference to a
mutable object can change when the later's value is changed.
8. Numbers, strings and tuples are immutable, while dictionaries and lists are
mutable.
Python passes references-to-objects by value.
For detail, see pass by value
2. Every object has an identity, a type and a value.
3. identity: is, id().
4. type() returns an object's type.
5. Objects whose value can change are said to be mutable.
6. Objects whose value is unchangeable once they are created are called immutable.
7. The value of an immutable container object that contains a reference to a
mutable object can change when the later's value is changed.
8. Numbers, strings and tuples are immutable, while dictionaries and lists are
mutable.
Python passes references-to-objects by value.
For detail, see pass by value
- Python notes: mutable and immutable
- python immutable and mutable
- python学习之---mutable and immutable
- Mutable and Immutable Objects
- python mutable 和 immutable
- Creating Mutable and Immutable StringObjects
- Mutable and Immutable Collections的区别
- 可变类和不可变类(Mutable and Immutable Objects)
- SCALA 集合框架文档翻译-Mutable and Immutable Collections
- 28What are mutable and immutable types in Objective C?
- python面向对象特性----mutable, immutable, 函数传参
- python-对象之hashable&unhashable与immutable&mutable
- scala:Guides and Overviews阅读笔记之一 -- Mutable and Immutable Collections
- Scala var val mutable immutable
- immutable和mutable对象(java)
- python 中 值传递 引用传递 可更改(mutable)与不可更改(immutable)对象
- [Python] python-ldap installation and usage notes
- 可变类和不可变类(Mutable and Immutable Objects) 1. 可变类和不可变类(Mutable and Immutable Objects)的初步定义: 可变类:当你获得这个
- 做好工作源于自信
- JBoss7配置指南(二)
- Linux对I/O端口资源的管理
- 函数指针、指针函数、常量指针、指针常量、指向常量的常量指针
- JBoss7配置指南(三)
- Python notes: mutable and immutable
- Java schedule与scheduleAtFixRate区别
- Linux 音频编程接口
- 给menu添加颜色
- DEFINE_ENUM_FLAG_OPERATORS(x)的作用
- JBoss7配置指南四)
- asp.net ashx IHttpHandler
- myeclipse9安装SVN插件(myeclipes9 M1)
- 我是谁