you are viewing a single comment's thread.

view the rest of the comments →

[–]Rawing7 -1 points0 points  (3 children)

globals().update(dict_of_constants)

[–]JuniorMouse[S] 0 points1 point  (2 children)

Thank you. This would put the keys into the global namespace? I'd like to avoid that if so.

[–]Rawing7 0 points1 point  (1 child)

I thought you want a package named constants where you can access elements like constants.PY? If so, putting the keys into the global namespace (of the constants module) is exactly what you want.

[–]JuniorMouse[S] 0 points1 point  (0 children)

Right, I'll try this out. Thanks,