psychopy.org | Reference | Downloads | Github

The GUI (including the pop-up help message) says use brackets [ ] but the pre-populated value uses parentheses () instead

Win10
2021.1.4:
Standalone

What are you trying to achieve?:
I’m trying to determine whether there’s an inconsistency in the GUI or if I’m mis-interpreting something.

If I select TEXT - LAYOUT, I see “Position [x,y] $
It’s as though the user is being asked to enter a list.
However, the corresponding, pre-populated value is not [0,0] but (0,0)
It’s as though the user is being asked to enter a tuple rather than a list.
As it turn out, only the use of parentheses works. The use of brackets (as recommended in the GUI-provided suggestion) generates a syntax error. So, is “TEXT - LAYOUT, Position [x,y] $” supposed to read, “TEXT - LAYOUT, Position (x,y) $” ?

In theory, either a tuple (x, y), list [x, y] or just x, y should all work - the parameter is of type “list” so when it compiles to Python or JS it works out what perentheses are needed. So as it doesn’t matter which one is used we’ve not been very stringent in checking - but yes I agree the labels should match the defaults! Could you add this as in issue on GitHub so it stays on our radar? Issues · psychopy/psychopy · GitHub

OK. I will add an issue on GitHub. And note, brackets do not substitute for parentheses in this case. The use of brackets generates a syntax error.