From 2cb4a90f4414da4887bfe90f11ca17f28dec24dd Mon Sep 17 00:00:00 2001 From: j Date: Fri, 7 Apr 2023 00:57:46 +0200 Subject: [PATCH] Update page 'Day 6 homework' --- Day 6 homework.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Day 6 homework.md diff --git a/Day 6 homework.md b/Day 6 homework.md new file mode 100644 index 0000000..8929f64 --- /dev/null +++ b/Day 6 homework.md @@ -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. \ No newline at end of file