classes — reading what ai just wrote you6 / 9
instance vs class attributes — and the bug ai ships every time
Claude wrote a Player class with an inventory = [] at the class
level. Two players share the same inventory list. The output is
['sword', 'shield'] ['sword', 'shield'] instead of
['sword'] ['shield'].
Move the list into __init__ so each player gets its own. After the
fix the output should be:
['sword'] ['shield']
The break is on line 2 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _