| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python315/Lib/profiling/sampling/__pycache__/ |
Upload File : |
R
>lqj� c � � Q s Q Q2 sP! )zRString table implementation for memory-efficient string storage in profiling data.c �D ` � \ sQ s]s n QsQ sQ sQ sQ sQ s Qs
U sP! )�StringTablez?A string table for interning strings and reducing memory usage.c �$ � , U m - U m P! )N)�_strings�_string_to_index��selfs &�4C:\Python315\\Lib\profiling\sampling\string_table.py�__init__�StringTable.__init__ s � ���
� "��� c � � [ U[ 2 % f [ U2 oVO 7 c U O U* ! [ U O 2 oU O O U2 V O U$ U! )z�Intern a string and return its index.
Args:
string: The string to intern
Returns:
int: The index of the string in the table
)�
isinstance�strr �lenr �append)r �string�indexs && r �intern�StringTable.intern
sj � � �&�#�&�&���[�F��*�*�*��(�(��0�0��D�M�M�"���
�
���V�$�(-���f�%��r c �z � ] St96: c [ U O 2 6 c L P! U O U* ! P! )z�Get a string by its index.
Args:
index: The index of the string
Returns:
str: The string at the given index, or empty string if invalid
�r r )r r s &&r �
get_string�StringTable.get_string s1 � �
��*��D�M�M�*�*�� �=�=��'�'�r c �8 � U O O 2 ! )zYGet the list of all strings in the table.
Returns:
list: A copy of the strings list
)r �copyr s &r �get_strings�StringTable.get_strings+ s � � �}�}�!�!�#�#r c �. � [ U O 2 ! )z*Return the number of strings in the table.r r s &r �__len__�StringTable.__len__3 s � ��4�=�=�!�!r )r r )�__name__�
__module__�__qualname__�__firstlineno__�__doc__r r r r r �__static_attributes__�__classdictcell__)�
__classdict__s @r r r s&