From cb80de7a3083a1559efb6a449081727d22f914ad Mon Sep 17 00:00:00 2001 From: Karenzz Date: Thu, 6 Apr 2023 22:48:55 +0200 Subject: [PATCH] Update page 'Day 5 Homework - Karen' --- Day 5 Homework - Karen.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Day 5 Homework - Karen.md b/Day 5 Homework - Karen.md index 1f4df49..5ce3015 100644 --- a/Day 5 Homework - Karen.md +++ b/Day 5 Homework - Karen.md @@ -1,3 +1,5 @@ +**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.** + ``` class Vault: def __init__(self):