Vc .dZgdZddlZdZdZdZeezZdZedzd 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 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789abcdefABCDEF01234567z !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~c|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.  )joinmapstr capitalizesplit)sseps /usr/lib64/python3.11/string.pyrr%s2 J3  S>> ? ??)ChainMapcheZdZdZdZdZdZejZ fdZ dZ dZ e fdZe fd Zd Zd ZxZS) r z.A string class for supporting $-substitutions.$z(?a:[_a-z][_a-z0-9]*)Nc <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 ) ) super__init_subclass____dict__r$_reescape delimiter idpatternbraceidpatterncompileflagsVERBOSE)clsr$delimidbid __class__s rr&zTemplate.__init_subclass__Es !!###  $ kGGJs}--EB$5 C   Gk'39s{+BCC rc||_dSN)template)selfr7s r__init__zTemplate.__init__Ws   rc |d}|jd|d}|sd}d}n<|td|ddz }t|}t d||fz)NinvalidT)keependsz.Invalid placeholder in string: line %d, col %d)startr7 splitlineslenr ValueError)r8moilinescolnolinenos r_invalidzTemplate._invalid\s HHY   bqb!,,d,;; EFFBGGE#2#J//000EZZFI %)** *rc tur|n|rt|fd}j|jS)Nc<|dp|d}|t|S|djS|d|t djNnamedbracedescapedr;#Unrecognized named group in pattern)grouprr*rIrCr$rDrMmappingr8s rconvertz$Template.substitute..convertnsHHW%%;(););E +75>***xx "" &~%xx "" " b!!!B!\++ +r_sentinel_dict _ChainMapr$subr7r8rSkwsrTs`` r substitutezTemplate.substitutehsi n $ .GG  .W--G + + + + + +|777rc tur|n|rt|fd}j|jS)Nc|dp|d}|: t|S#t$r|cYSwxYw|djS|d|St djrL)rQrKeyErrorr*rCr$rRs rrTz)Template.safe_substitute..convertsHHW%%;(););E &&wu~...&&&88::%%%&xx "" &~%xx "" "xxzz!B!\++ +sAA%$A%rUrYs`` rsafe_substitutezTemplate.safe_substitute{si n $ .GG  .W--G + + + + + +|777rc"|j|jD]n}|ddS|d?|d*|dt d|jodS)Nr;FrMrNrOrPT)r$finditerr7rQrC)r8rDs ris_validzTemplate.is_valids,'' 66 " "Bxx "" uu!! "HHX&& "HHY'' " !!FL"""trc\g}|j|jD]}|dp|d}|||vr||H|?|d*|dt d|j|S)NrMrNr;rOrP)r$rar7rQappendrC)r8idsrDrMs rget_identifierszTemplate.get_identifierss,'' 66 " "BHHW%%;(););E "U#%5 " 5!!!! "HHY'' "HHY'' " !!FL""" r)__name__ __module__ __qualname____doc__r*r+r,r( IGNORECASEr.r&r9rIrVr[r_rbrf __classcell__)r4s@rr r 9s88I )IN NEDDDDD$!!! * * *"08888&'58888*   rr cHeZdZdZdZ d dZdZdZdZdZ d Z d Z d S) r c0||||Sr6)vformat)r8 format_stringargskwargss rformatzFormatter.formats||M4888rct}|||||d\}}|||||S)N)set_vformatcheck_unused_args)r8rprqrr used_argsresult_s rrozFormatter.vformatsEEE MM-vy!LL  y$777 rrc |dkrtdg}||D]\}} } } |r||| | dkr(|durtdt|} |dz }n'| r|rtdd}|| ||\} } || || | } || ||||dz |\} }|| | | d ||fS)NrzMax string recursion exceededr>FzJcannot switch from manual field specification to automatic field numberingr=)auto_arg_index) rCparserdrisdigit get_fieldadd convert_fieldrw format_fieldr)r8rprqrrryrecursion_depthr}rz literal_text field_name format_spec conversionobjarg_useds rrwzFormatter._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..rcLt|tr||S||Sr6) isinstanceint)r8keyrqrrs r get_valuezFormatter.get_values( c3   9 #; rcdSr6)r8ryrqrrs rrxzFormatter.check_unused_argss rc"t||Sr6)rs)r8valuers rrzFormatter.format_fieldse[)))rc||S|dkrt|S|dkrt|S|dkrt|Std|)Nrraz"Unknown conversion specifier {0!s})rreprasciirCrs)r8rrs rrzFormatter.convert_field sw  L 3  u::  3  ;;  3  << =DDZPPQQQrc*tj|Sr6)_stringformatter_parser)r8rps rr~zFormatter.parses' 666rctj|\}}||||}|D] \}}|rt||}||}!||fSr6)rformatter_field_name_splitrgetattr) r8rrqrrfirstrestris_attrrEs rrzFormatter.get_field(sl8DD tnnUD&11  JGQ c1oo!fEzrN)r) rgrhrirsrorwrrxrrr~rrrrr r s999!"3/3/3/3/l   *** R R R(777     rr r6)rj__all__rr rrrrrrr r rrer( collectionsr rWrVr r&r rrrrs6  2 2 2 ../1  X  (  5 ] "[ 0: = @ @ @ @------rrrrrrrrl yyyyyyyyyyr