Vc .csdZgdZddlZdZdZdZeezZdZedzd zZd Z d Z eeze zezZ dd Z ddl Zdd lmZiZGddZeGddZdS)anA collection of string constants. Public module variables: whitespace -- a string containing all ASCII whitespace ascii_lowercase -- a string containing all ASCII lowercase letters ascii_uppercase -- a string containing all ASCII uppercase letters ascii_letters -- a string containing all ASCII letters digits -- a string containing all ASCII decimal digits hexdigits -- a string containing all ASCII hexadecimal digits octdigits -- a string containing all ASCII octal digits punctuation -- a string containing all ASCII punctuation characters printable -- a string containing all ASCII characters considered printable ) ascii_lettersascii_lowercaseascii_uppercasecapwordsdigits hexdigits octdigits printable punctuation whitespace FormatterTemplateNz ZabcdefghijklmnopqrstuvwxyzZABCDEFGHIJKLMNOPQRSTUVWXYZZ 0123456789ZabcdefZABCDEFZ01234567z !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~cs|pdttj||S)acapwords(s [,sep]) -> string Split the argument into words using split, capitalize each word using capitalize, and join the capitalized words using join. If the optional second argument sep is absent or None, runs of whitespace characters are replaced by a single space and leading and trailing whitespace are removed, otherwise sep is used to split and join the words. z )joinZmapstrZ capitalizeZsplit)sZsep /usr/lib64/python3.11/string.pyrr%s2 J3  S>> ? ??)ChainMapcsheZdZdZdZdZdZejZ fdZ dZ dZ e fdZe fd Zd Zd ZxZS) r z.A string class for supporting $-substitutions.z$z(?a:[_a-z][_a-z0-9]*)Nc s<td|jvr|j}n=t j|j}|j}|jp|j}d|d|d|d|d }t j ||j tj z|_dS)Npatternz z(?: (?PzC) | # Escape sequence of two delimiters (?PzJ) | # delimiter and a Python identifier {(?Pz)} | # delimiter and a braced identifier (?P) # Other ill-formed delimiter exprs ) ) Zsuper__init_subclass__Z__dict__r_reZescape delimiter idpatternbraceidpatternZcompileflagsZVERBOSE)ZclsrZdelimZidZbid __class__s rrzTemplate.__init_subclass__Es !!###  $ kGGJs}--EB$5 C   Gk'39s{+BCC rcs||_dSN)template)selfrrr__init__zTemplate.__init__Ws   rcs |d}|jd|d}|sd}d}n<|td|ddz }t|}t d||fz)NinvalidT)Zkeependsiz.Invalid placeholder in string: line %d, col %d)ZstartrZ splitlinesZlenr ValueError)rmoiZlinesZcolnoZlinenos r_invalidzTemplate._invalid\s HHY   bqb!,,d,;; EFFBGGE#2#J//000EZZFI %)** *rc tur|n|rt|fd}j|jS)Ncs<|dp|d}|t|S|djS|d|t djNnamedbracedescapedr #Unrecognized named group in pattern)grouprrr&r#rr$r)mappingr rconvertz$Template.substitute..convertnsHHW%%;(););E +75>***xx "" &~%xx "" " b!!!B!\++ +r_sentinel_dict _ChainMaprZsubrrr/Zkwsr1`` r substitutezTemplate.substitutehsi n $ .GG  .W--G + + + + + +|777rc r')Ncs|dp|d}|: t|S#t$r|cYSwxYw|djS|d|St djr()r-rZKeyErrorrr#rr.r0rr1z)Template.safe_substitute..convertsHHW%%;(););E &&wu~...&&&88::%%%&xx "" &~%xx "" "xxzz!B!\++ +sAA%$A%r2r5r6rsafe_substitutezTemplate.safe_substitute{si n $ .GG  .W--G + + + + + +|777rcs"|j|jD]n}|ddS|d?|d*|dt d|jodS)Nr Fr)r*r+r,T)rfinditerrr-r#)rr$rris_validzTemplate.is_valids,'' 66 " "Bxx "" uu!! "HHX&& "HHY'' " !!FL"""trcs\g}|j|jD]}|dp|d}|||vr||H|?|d*|dt d|j|S)Nr)r*r r+r,)rr9rr-appendr#)rZidsr$r) rget_identifierszTemplate.get_identifierss,'' 66 " "BHHW%%;(););E "U#%5 " 5!!!! "HHY'' "HHY'' " !!FL""" r)__name__ __module__ __qualname____doc__rrrrZ IGNORECASErrrr&r3r7r8r:r=Z __classcell__)rs@rr r 9s88I )IN NEDDDDD$!!! * * *"08888&'58888*   rr csHeZdZdZdZ d dZdZdZdZdZ d Z d Z d S) r cs0||||Sr)vformat)r format_stringargskwargsr<rformatzFormatter.formats||M4888rcst}|||||d\}}|||||S)Ni)Zset_vformatcheck_unused_args)rrCrDrE used_argsresultZ_s rrBzFormatter.vformatsEEE MM-vy!LL  y$777 rr c s|dkrtdg}||D]\}} } } |r||| | dkr(|durtdt|} |dz }n'| r|rtdd}|| ||\} } || || | } || ||||dz |\} }|| | | d ||fS)Nr zMax string recursion exceededr"FzJcannot switch from manual field specification to automatic field numberingr!)auto_arg_index) r#parser;rZisdigit get_fieldZadd convert_fieldrG format_fieldr )rrCrDrErIZrecursion_depthrKrJZ literal_text field_name format_spec conversionobjZarg_useds rrGzFormatter._vformats Q  ><== = =)), C, C =L*k: , l+++$ C #+%.6(*5666"%^!4!4J"a'NN''))+%6(*5666 &+N!%z4 H H X h'''((j99/3mmvq0#1/</3/3+ ^  d//[AABBBwwv..rcsLt|tr||S||Sr)Z isinstanceZint)rZkeyrDrEr<r get_valuezFormatter.get_values( c3   9 #; rcsdSr)rrIrDrEr<rrHzFormatter.check_unused_argss rcs"t||Sr)rF)rvaluerQ rrOzFormatter.format_fieldse[)))rcs||S|dkrt|S|dkrt|S|dkrt|Std|)NrZrZaz"Unknown conversion specifier {0!s})rZreprZasciir#rF)rrVrRrWrrNzFormatter.convert_field sw  L 3  u::  3  ;;  3  << =DDZPPQQQrcs*tj|Sr)_stringZformatter_parser)rrCrrrLzFormatter.parses' 666rcstj|\}}||||}|D] \}}|rt||}||}!||fSr)rXZformatter_field_name_splitrTZgetattr) rrPrDrEZfirstZrestrSZis_attrr%s rrMzFormatter.get_field(sl8DD tnnUD&11  JGQ c1oo!fEzrN)r ) r>r?r@rFrBrGrTrHrOrNrLrMrUrrr r s999!"3/3/3/3/l   *** R R R(777     rr r)rAZ__all__rXr rrrrrrrrrZrerZ collectionsrr4r3r rr rUrrrYs6  2 2 2 ../1  X  (  5 ] "[ 0: = @ @ @ @------rrrrrrrrl yyyyyyyyyyr