[issue44387] Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on Windows)

2021-06-10 Thread Richard Mines


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

Code fragment showing that locale.LC_MESSAGES can be non-existent:
https://github.com/python/cpython/blob/62f1d2b3d7dda99598d053e10b785c463fdcf591/Lib/locale.py#L1747-L1752

Reading documentation it's not obvious that locale.LC_MESSAGES may not exist 
(e.g. Windows - Microsoft Store - Python 3.8)

--
assignee: docs@python
components: Documentation
messages: 395588
nosy: docs@python, richardmines91
priority: normal
severity: normal
status: open
title: Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on 
Windows)
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 
<https://bugs.python.org/issue44387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44387] Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on Windows)

2021-06-11 Thread Richard Mines


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://github.com/python/cpython/blob/62f1d2b3d7dda99598d053e10b785c463fdcf591/Lib/locale.py#L57

OS: Windows 10 20H2
Python: 3.8.10
Exact link to get python: 
https://www.microsoft.com/ru-ru/p/python-38/9mssztt1n39l?activetab=pivot:overviewtab

--
Added file: https://bugs.python.org/file50102/lc_messages_not_exist.png

___
Python tracker 
<https://bugs.python.org/issue44387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com