Practice · 2 of 3
Frozen Config
CHALLENGE
Difficulty: intermediate+25 XP
Define a frozen dataclass Config(host='localhost', port=8080). Verify: two defaults are equal, and attempting to set config.port raises an exception (dataclasses.FrozenInstanceError).
Press Submit to check your solution.
Back to lesson: Practice: Dataclass Drills