Skip to content

babel.lists.format_list errors on 'standard-narrow' style for German locale #781

@amelia-bruno

Description

@amelia-bruno

Steps to Reproduce

from babel.lists import format_list
format_list(['A', 'B', 'C'], style='standard-narrow', locale='de')

Actual Results

Traceback (most recent call last):
File "C:\Users\amelia.bruno\PycharmProjects\orion\prompt-generators\pg-sport\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-3-fdcd09f7f101>", line 1, in <module>
    format_list(['A', 'B', 'C'], style='standard-narrow', locale='de')
File "C:\Users\amelia.bruno\PycharmProjects\orion\prompt-generators\pg-sport\venv\lib\site-packages\babel\lists.py", line 82, in format_list
    result = patterns['start'].format(lst[0], lst[1])
File "C:\Users\amelia.bruno\PycharmProjects\orion\prompt-generators\pg-sport\venv\lib\site-packages\babel\localedata.py", line 218, in __getitem__
    orig = val = self._data[key]
KeyError: 'start'

Expected Results

The english locale gives the expected result:

format_list(['A', 'B', 'C'], style='standard-narrow', locale='en')
Out[4]: 'A, B, C'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions