Skip to content

BF: Ignore spaces when getting variables from name #5841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

TEParsons
Copy link
Contributor

Prevents e.g.

text1 = visual.TextStim(win, ...)
mouse1 = event.Mouse(win, ...)
clickables = environmenttools.getFromNames(" text1", namespace=locals())
for obj in clickables:
    if obj.contains(mouse1):
        continueRoutine = False

from raising a "str has no attribute contains" error

@TEParsons TEParsons requested a review from mdcutone August 23, 2023 12:47
@TEParsons TEParsons merged commit 8a7e1db into psychopy:release Aug 24, 2023
@TEParsons TEParsons deleted the release-varname-spaces branch August 31, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant