Constants: are they there somewhere?



Some of the GM libraries use constants; others don’t. That is fine, though of course it would be nice if we had constants for things like checkbox choices values (“on” and “off”), among other things. This way we would eliminate typo bugs (which, in python, can sometimes be tricky to debug) and would ensure that it is easy to update code if the convention changes.

Are they already there, somewhere? Does anyone know? If not, I could start putting them in as I use them for my module. Would people say they belong to, perhaps? Or we could have a separate file for constants that are used across libraries (such as “yes”, “on”, “off” and I am sure there are other things).


I would think common, broadly useful constants belong in a separate file. Putting them in with some other code just increases the chance of inadvertently creating a mutual dependency down the road.


Agreed; plus, nobody will find them there…
I will create a file and will start with putting things like “on” and “off” there :).


FWIW, PEP-8 naming conventions are here: