Linux jobworks 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:53:05 UTC 2026 x86_64
Apache/2.4.58 (Ubuntu)
Server IP : 10.0.1.5 & Your IP : 216.73.217.52
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
babel /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2025-08-05 17:02
locale-data
[ DIR ]
drwxr-xr-x
2025-08-05 17:02
localtime
[ DIR ]
drwxr-xr-x
2025-08-05 17:02
messages
[ DIR ]
drwxr-xr-x
2025-08-05 17:02
__init__.py
691
B
-rw-r--r--
2022-06-16 05:56
core.py
36.18
KB
-rw-r--r--
2022-06-16 05:56
dates.py
68.51
KB
-rw-r--r--
2023-11-24 10:19
global.dat
252.58
KB
-rw-r--r--
2023-11-24 10:19
languages.py
2.66
KB
-rw-r--r--
2022-06-16 05:56
lists.py
2.63
KB
-rw-r--r--
2022-06-16 05:56
localedata.py
7.69
KB
-rw-r--r--
2022-06-16 05:56
numbers.py
39.04
KB
-rw-r--r--
2022-06-16 05:56
plural.py
21.58
KB
-rw-r--r--
2022-06-16 05:56
support.py
21.74
KB
-rw-r--r--
2023-11-24 10:19
units.py
10.92
KB
-rw-r--r--
2022-06-16 05:56
util.py
7.38
KB
-rw-r--r--
2022-06-16 05:56
Save
Rename
""" 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. """ from babel.core import Locale, default_locale DEFAULT_LOCALE = default_locale() def format_list(lst, style='standard', locale=DEFAULT_LOCALE): """ 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\u3001oranges\u548cpears' >>> 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 """ locale = Locale.parse(locale) if not lst: return '' if len(lst) == 1: return lst[0] if style not in locale.list_patterns: raise ValueError('Locale %s does not support list formatting style %r (supported are %s)' % ( locale, style, list(sorted(locale.list_patterns)), )) patterns = locale.list_patterns[style] if len(lst) == 2: return patterns['2'].format(*lst) result = patterns['start'].format(lst[0], lst[1]) for elem in lst[2:-1]: result = patterns['middle'].format(result, elem) result = patterns['end'].format(result, lst[-1]) return result