zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
U
¡ý°d×ã@srdZddlZddlmZe d¡Ze d¡Ze d¡Ze d¡ZeefZ    eefZ
e e
e e    iZ dd
d „Zd d „ZdS)z®
requests._internal_utils
~~~~~~~~~~~~~~
 
Provides utility functions that are consumed internally by Requests
which depend on extremely few external helpers (such as compat)
éNé)Ú builtin_strs^[^:\s][^:\r\n]*$z^[^:\s][^:\r\n]*$s^\S[^\r\n]*$|^$z^\S[^\r\n]*$|^$ÚasciicCst|tƒr|}n
| |¡}|S)zËGiven a string object, regardless of type, returns a representation of
    that string in the native string type, encoding and decoding where
    necessary. This assumes ASCII unless told otherwise.
    )Ú
isinstancerÚdecode)ÚstringÚencodingÚout©r
úOd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\requests/_internal_utils.pyÚto_native_strings
 
r cCs:t|tƒst‚z| d¡WdStk
r4YdSXdS)z´Determine if unicode string only contains ASCII characters.
 
    :param str u_string: unicode string to check. Must be unicode
        and not Python 2 `str`.
    :rtype: bool
    rTFN)rÚstrÚAssertionErrorÚencodeÚUnicodeEncodeError)Úu_stringr
r
r Úunicode_is_ascii&s 
r)r)Ú__doc__ÚreÚcompatrÚcompileZ_VALID_HEADER_NAME_RE_BYTEZ_VALID_HEADER_NAME_RE_STRZ_VALID_HEADER_VALUE_RE_BYTEZ_VALID_HEADER_VALUE_RE_STRZ_HEADER_VALIDATORS_STRZ_HEADER_VALIDATORS_BYTEÚbytesr ZHEADER_VALIDATORSr rr
r
r
r Ú<module>s 
 
 
 
þ