HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //lib/python3.9/site-packages/redis/commands/search/__pycache__/suggestion.cpython-39.pyc
a

��b��@s,ddlmZGdd�d�ZGdd�d�ZdS)�)�	to_stringc@s"eZdZdZddd�Zdd�ZdS)	�
Suggestionz`
    Represents a single suggestion being sent or returned from the
    autocomplete server
    ��?NcCst|�|_t|�|_||_dS�N)r�string�payload�score)�selfrrr�r
�D/usr/lib/python3.9/site-packages/redis/commands/search/suggestion.py�__init__
s

zSuggestion.__init__cCs|jSr)r)r	r
r
r�__repr__szSuggestion.__repr__)rN)�__name__�
__module__�__qualname__�__doc__rr
r
r
r
rrs
rc@s eZdZdZdd�Zdd�ZdS)�SuggestionParserz�
    Internal class used to parse results from the `SUGGET` command.
    This needs to consume either 1, 2, or 3 values at a time from
    the return value depending on what objects were requested
    cCsb||_||_|r(|r(d|_d|_d|_n0|r:d|_d|_n|rLd|_d|_nd|_d|_||_dS)N�r����)�with_scores�
with_payloads�sugsize�	_scoreidx�_payloadidx�_sugs)r	rr�retr
r
rrszSuggestionParser.__init__ccsntdt|j�|j�D]T}|j|}|jr<t|j||j�nd}|jrV|j||jnd}t	|||�VqdS)N�r)
�range�lenrrr�floatrrrr)r	�i�ssrrr
r
r�__iter__.s

zSuggestionParser.__iter__N)rrrrrr#r
r
r
rrsrN)Z_utilrrrr
r
r
r�<module>s