mirror of
https://github.com/rasbt/python_reference.git
synced 2024-11-27 22:11:13 +00:00
immutable tuple upd.
This commit is contained in:
parent
945885ffba
commit
40d7d7b897
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"signature": "sha256:65ce88feaf4030991defb4ffc22e758e20be8f6dc5dc3046d5c804aa0089de06"
|
"signature": "sha256:d6f2ef62f297b01c2d33ebe34af91db1e402323086d1abc1c6827557351df297"
|
||||||
},
|
},
|
||||||
"nbformat": 3,
|
"nbformat": 3,
|
||||||
"nbformat_minor": 0,
|
"nbformat_minor": 0,
|
||||||
|
@ -839,7 +839,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"As we all know, tuples are immutable objects in Python, right!? But what happens if they contain mutable objects? \n",
|
"As we all know, tuples are immutable objects in Python, right!? But what happens if they contain mutable objects? \n",
|
||||||
"\n",
|
"\n",
|
||||||
"First, let us have a look at the expected behavior: a `TypeError` is raised if we try to modify a value tuple: "
|
"First, let us have a look at the expected behavior: a `TypeError` is raised if we try to modify immutable types in a tuple: "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"signature": "sha256:65ce88feaf4030991defb4ffc22e758e20be8f6dc5dc3046d5c804aa0089de06"
|
"signature": "sha256:d6f2ef62f297b01c2d33ebe34af91db1e402323086d1abc1c6827557351df297"
|
||||||
},
|
},
|
||||||
"nbformat": 3,
|
"nbformat": 3,
|
||||||
"nbformat_minor": 0,
|
"nbformat_minor": 0,
|
||||||
|
@ -839,7 +839,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"As we all know, tuples are immutable objects in Python, right!? But what happens if they contain mutable objects? \n",
|
"As we all know, tuples are immutable objects in Python, right!? But what happens if they contain mutable objects? \n",
|
||||||
"\n",
|
"\n",
|
||||||
"First, let us have a look at the expected behavior: a `TypeError` is raised if we try to modify a value tuple: "
|
"First, let us have a look at the expected behavior: a `TypeError` is raised if we try to modify immutable types in a tuple: "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user