OOP & Design Patterns - Command Pattern - Undo/Redo, Request Queuing & Logging
Review the following Invoker method snippet for executing commands with undo/redo support. Identify the bug that causes the redo stack to not clear correctly after a new command execution.
def execute_command(self, command):
command.execute()
self.undo_stack.append(command)
# Missing line here?
