1 # ˆ¿Á ƒއÀa–ß=¿JJj"Tâ‚fàš¸'Å£Ä o a ò³‰`Ÿ ã@s,dZddlmZmZeƒZdefdd„ZdS)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-2021 by the Babel Team. :license: BSD, see LICENSE for more details. é)ÚLocaleÚdefault_localeZstandardcCsÂt |¡}|sdSt|ƒdkr&|dS||jvrLtd||tt|jƒƒfƒ‚|j|}t|ƒdkrp|dj|ŽS|d |d|d¡}|dd…D]}|d  ||¡}q”|d  ||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 ÚérzFLocale %s does not support list formatting style %r (supported are %s)éÚ2ÚstartéÿÿÿÿZmiddleÚend)rÚparseÚlenZ list_patternsÚ ValueErrorÚlistÚsortedÚformat)ZlstZstyleÚlocaleÚpatternsÚresultÚelem©rú//usr/lib/python3.9/site-packages/babel/lists.pyÚ format_lists&*    ý  rN)Ú__doc__Z babel.corerrZDEFAULT_LOCALErrrrrÚs$ ˆl–äY>””†Ù”â�nãa¸&Tţà „q–Úg¿Å?÷ a ´iGã@sdZdZgd¢ZddlZddlZddlZddl m Z m Z dZ dZ dZd Zd Zd Zd ZGd d„deƒZdd„ZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZdd„ZGdd„deƒZGdd „d eƒZGd!d"„d"eƒZGd#d$„d$eƒZ Gd%d&„d&eƒZ!Gd'd(„d(eƒZ"Gd)d*„d*e"ƒZ#Gd+d,„d,e"ƒZ$Gd-d.„d.eƒZ%Gd/d0„d0eƒZ&Gd1d2„d2eƒZ'Gd3d4„d4eƒZ(Gd5d6„d6eƒZ)Gd7d8„d8eƒZ*Gd9d:„d:e%ƒZ+Gd;d<„d„d>eƒZ-Gd?d@„d@eƒZ.GdAdB„dBe.ƒZ/GdCdD„dDe/ƒZ0GdEdF„dFee.ƒZ1dS)Gaû Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The following is a simple usage example that sums integers from the command-line and writes the result to a file:: parser = argparse.ArgumentParser( description='sum the integers at the command line') parser.add_argument( 'integers', metavar='int', nargs='+', type=int, help='an integer to be summed') parser.add_argument( '--log', default=sys.stdout, type=argparse.FileType('w'), help='the file where the sum shoul