Use globals() instead of locals() for adding colormaps as names to cm module by timhoffm · Pull Request #19649 · matplotlib/matplotlib · GitHub
Skip to content

Use globals() instead of locals() for adding colormaps as names to cm module - #19649

Merged
anntzer merged 1 commit into
matplotlib:masterfrom
timhoffm:globals
Mar 6, 2021
Merged

anntzer merged 1 commit into
matplotlib:masterfrom
timhoffm:globals

Conversation

@timhoffm

@timhoffm timhoffm commented Mar 5, 2021

Copy link
Copy Markdown
Member

PR Summary

While this seems to have been working, manipulating locals() is not guaranteed to have any effect.
https://docs.python.org/3/library/functions.html#locals

@anntzer
anntzer merged commit 71c9f09 into matplotlib:master Mar 6, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 6, 2021
@timhoffm
timhoffm deleted the globals branch March 6, 2021 10:43
dstansby added a commit that referenced this pull request Mar 6, 2021
…649-on-v3.4.x

Backport PR #19649 on branch v3.4.x (Use globals() instead of locals() for adding colormaps as names to cm module)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants