Skip to content

Commit 69b2774

Browse files
committed
immutable tuple upd.
1 parent f3844ea commit 69b2774

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

not_so_obvious_python_stuff.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:29a120258e2d108ed5eace08e071ad866ae379b4f24fde804401ee858a2090fb"
4+
"signature": "sha256:5f8052b5458fbe30e4066fd51688157e823dbbcce9f2e4ef402acfc6af40d046"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -985,7 +985,7 @@
985985
"\n",
986986
"**A. Jesse Jiryu Davis** has a nice explanation for this phenomenon (Original source: [http://emptysqua.re/blog/python-increment-is-weird-part-ii/](http://emptysqua.re/blog/python-increment-is-weird-part-ii/))\n",
987987
"\n",
988-
"If we try to extend the list via `+=` *\"then the statement executes STORE_SUBSCR, which calls the C function PyObject_SetItem, which checks if the object supports item assignment. In our case the object is a tuple, so PyObject_SetItem throws the TypeError. Mystery solved.\"*"
988+
"If we try to extend the list via `+=` *\"then the statement executes `STORE_SUBSCR`, which calls the C function `PyObject_SetItem`, which checks if the object supports item assignment. In our case the object is a tuple, so `PyObject_SetItem` throws the `TypeError`. Mystery solved.\"*"
989989
]
990990
},
991991
{

0 commit comments

Comments
 (0)