Update page 'Day 6 homework'

j
2023-04-07 00:57:46 +02:00
parent 384021c14c
commit 2cb4a90f44
+1
@@ -0,0 +1 @@
The assignment for tonight is to write a class named Vault containing an attribute named "treasure" which returns "gold" under normal circumstances, but a warning message such as "attribute deleted!" if it detects any of its attributes have been changed. You can use the descriptor protocol (\_\_set\_\_, etc) to detect if its attributes have been changed, and it will have to check its own \_\_dict\_\_ against a known good copy before accessing the treasure attribute to make sure that the attributes are what they're supposed to be.