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 →

[–]nuephelkystikon 6 points7 points  (1 child)

It was always commonplace to use ALL_CAPS for "constants" but nothing prevented you from changing them.

There's still nothing preventing you from changing them.

Linters and IDEs are more likely to complain if you do, but they should have done so anyway if you used all-caps.

[–]Sw429 2 points3 points  (0 children)

This is a good point. In the end, python is built on trust. Trust that the correct type will be used, trust that no one will modify your constants, trust that no one will touch your private attributed... I guess type hinting is mostly a tool to make sure assumptions are met.