%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/babel/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/babel/__pycache__/lists.cpython-312.pyc

�

ƪb�
��2�dZddlmZmZe�Zdefd�Zy)aY
    babel.lists
    ~~~~~~~~~~~

    Locale dependent formatting of lists.

    The default locale for the functions in this module is determined by the
    following environment variables, in that order:

     * ``LC_ALL``, and
     * ``LANG``

    :copyright: (c) 2015-2022 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�)�Locale�default_locale�standardc���tj|�}|syt|�dk(r|dS||jvr1t	d|�d|�dtt
|j���d���|j|}t|�dk(r|d	j|�S|d
j|d|d�}|ddD]}|dj||�}�|d
j||d�}|S)u�
    Format the items in `lst` as a list.

    >>> format_list(['apples', 'oranges', 'pears'], locale='en')
    u'apples, oranges, and pears'
    >>> format_list(['apples', 'oranges', 'pears'], locale='zh')
    u'apples、oranges和pears'
    >>> format_list(['omena', 'peruna', 'aplari'], style='or', locale='fi')
    u'omena, peruna tai aplari'

    These styles are defined, but not all are necessarily available in all locales.
    The following text is verbatim from the Unicode TR35-49 spec [1].

    * standard:
      A typical 'and' list for arbitrary placeholders.
      eg. "January, February, and March"
    * standard-short:
      A short version of a 'and' list, suitable for use with short or abbreviated placeholder values.
      eg. "Jan., Feb., and Mar."
    * or:
      A typical 'or' list for arbitrary placeholders.
      eg. "January, February, or March"
    * or-short:
      A short version of an 'or' list.
      eg. "Jan., Feb., or Mar."
    * unit:
      A list suitable for wide units.
      eg. "3 feet, 7 inches"
    * unit-short:
      A list suitable for short units
      eg. "3 ft, 7 in"
    * unit-narrow:
      A list suitable for narrow units, where space on the screen is very limited.
      eg. "3′ 7″"

    [1]: https://www.unicode.org/reports/tr35/tr35-49/tr35-general.html#ListPatterns

    :param lst: a sequence of items to format in to a list
    :param style: the style to format the list with. See above for description.
    :param locale: the locale
    ��rzLocale z( does not support list formatting style z (supported are �)��2�start����middle�end)r�parse�len�
list_patterns�
ValueError�list�sorted�format)�lst�style�locale�patterns�result�elems      �-/usr/lib/python3/dist-packages/babel/lists.py�format_listrs��T�\�\�&�
!�F���
�3�x�1�}��1�v�
��F�(�(�(�������,�,�-�.�
��	�
�#�#�E�*�H�
�3�x�1�}�#�x��}�#�#�S�)�)�
�g�
�
%�
%�c�!�f�c�!�f�
5�F��A�b�	�9���(�#�*�*�6�4�8��9�
�e�_�
#�
#�F�C��G�
4�F��M�N)�__doc__�
babel.corerr�DEFAULT_LOCALEr�rr�<module>r$s$��� .��!��&�n�@r

Zerion Mini Shell 1.0