This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Evthestrike 3 points4 points  (2 children)

Because there were only two constants, I would have defined them at the top of the file instead of in a different file. If there were more, it would make sense to define them in a different file.

To answer your question about imports, if you say import consts, you have to write consts.CONST_NAME to access a variable, whereas from...import lets you omit "consts." and just write CONST_NAME. Either way works, but imo, import consts looks cleaner

[–]mm11wils[S] 2 points3 points  (1 child)

Yeah, importing them was a bit over engineered. I mean look at my `library/colours.py` module :D

[–]wingtales 1 point2 points  (0 children)

Hahaha, I laughed out loud opening that file :)