You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to modify the local `x` and the global `x` separately, you can create a [*copy*](https://docs.python.org/3/library/copy.html) of the list and assign the copy to the local `x`.
579
568
580
569
We will leave this for you to explore.
581
570
582
-
583
571
## Summary
584
572
585
573
Messages in this lecture are clear:
586
574
587
-
* In Python, *everything in memory is treated as an object*.
588
-
* Zero, one or many names can be bound to a given object.
589
-
* Every name resides within a scope defined by its namespace.
575
+
* In Python, *everything in memory is treated as an object*.
576
+
* Zero, one or many names can be bound to a given object.
577
+
* Every name resides within a scope defined by its namespace.
590
578
591
579
This includes not just lists, strings, etc., but also less obvious things, such as
If you want to modify the local `x` and the global `x` separately, you can create a [*copy*](https://docs.python.org/3/library/copy.html) of the list and assign the copy to the local `x`.
@@ -803,9 +790,9 @@ We will leave this for you to explore.
803
790
804
791
Messages in this lecture are clear:
805
792
806
-
* In Python, *everything in memory is treated as an object*.
807
-
* Zero, one or many names can be bound to a given object.
808
-
* Every name resides within a scope defined by its namespace.
793
+
* In Python, *everything in memory is treated as an object*.
794
+
* Zero, one or many names can be bound to a given object.
795
+
* Every name resides within a scope defined by its namespace.
809
796
810
797
This includes not just lists, strings, etc., but also less obvious things, such as
811
798
@@ -908,7 +895,7 @@ boolean object `True`.
908
895
```{hint}
909
896
:class: dropdown
910
897
911
-
You can use `callable()` to test whether an attribute of an object can be called as a function
898
+
You can use `callable()` to test whether an attribute of an object can be called as a function
0 commit comments