From b7302bcdfa517862446f1833436219233dff1c6e Mon Sep 17 00:00:00 2001 From: lucky8888 <261807903@qq.com> Date: Sat, 16 Mar 2019 11:34:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8B=98=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关于python中的对象可变不可变问题 --- languages/python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/python.md b/languages/python.md index bac9967..a59f215 100755 --- a/languages/python.md +++ b/languages/python.md @@ -114,7 +114,7 @@ dt2 = dt1.replace(minute = 0, second = 30) diff = dt1 - dt2 ``` -**注:Python 中的绝大多数对象都是可变的,只有字符串和元组例外。** +** 注:Python中的不可变对象只有`numbers`,`str`,`tuple`。 可变(Mutable)与不可变(Immutable)关键在于对象初始化之后内存`id`会不会改变** ## 数据结构