-Note: `get_and_format()` works by manually reconstructing a new text stimulus rather than attempting a deep copy of the original. Internally, it inspects the constructor signature of TextStim or TextBox2, pulls out all of the original instance’s stored keyword arguments (from its __dict__), replaces the text field with your formatted string, and then calls the class constructor with that argument set. This approach avoids mutating the version cached in StimBank, but because PsychoPy objects don’t support true deep copying, some complex properties—especially in TextBox2 (e.g. wrapping behavior or anchor points)—may not carry over exactly as in the original. If you hit unexpected layout or formatting issues using `TextBox2`, consider using `TextStim`type or `rebuild()` with a new `text` override instead.
0 commit comments