Richard Mines added the comment:
If you need a proof that it is possible that locale.LC_MESSAGES doesn't exist,
I've attached a screenshot. Even more I'm showing that locale.LC_TIME may be
equal to 5 which is a placeholder for locale.LC_MESSAGES if there is an
ImportError:
https
New submission from Richard Mines :
Documentation page:
https://docs.python.org/3/library/locale.html#locale.LC_MESSAGES
Code comment saying that locale.LC_MESSAGES doesn't exist sometimes:
https://github.com/python/cpython/blob/62f1d2b3d7dda99598d053e10b785c463fdcf591/Lib/locale.py#L25-L26