-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Do we really need to add every color to locals()? #81
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
Comments
I would love some feedback here. I think the only problem with removing all colors from |
Could probably use some the main format should be int, because one can simply |
So the problem right now is that the colors can be accessed in at least three different ways: |
I still think we should move all colors to something like |
#488 implements this. |
Currently,
constants.py
is adding every color insideCOLOR_MAP
to thelocals()
dictionary. This is usually frowned upon in Python in general.If we want to keep exposing all colors to the end user without any namespace access (like
manim.colors.RED
or some such), then we can carefully import all colors inside__init__.py
. This could be done for the purpose of backward compatibility.The text was updated successfully, but these errors were encountered: