⚝
One Hat Cyber Team
⚝
Your IP:
160.79.111.159
Server IP:
162.254.39.145
Server:
Linux premium289.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib64
/
python3.6
/
lib2to3
/
fixes
/
__pycache__
/
View File Name :
fix_filter.cpython-36.pyc
3 \[ � @ sV d Z ddlmZ ddlmZ ddlmZ ddlm Z m Z mZmZ G dd� dej �ZdS ) a� Fixer that changes filter(F, X) into list(filter(F, X)). We avoid the transformation if the filter() call is directly contained in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:. NOTE: This is still not correct if the original code was depending on filter(F, X) to return a string if X is a string and a tuple if X is a tuple. That would require type inference, which we don't do. Let Python 2.6 figure it out. � )� fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_contextc @ s e Zd ZdZdZdZdd� ZdS )� FixFilterTaV filter_lambda=power< 'filter' trailer< '(' arglist< lambdef< 'lambda' (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any > ',' it=any > ')' > [extra_trailers=trailer*] > | power< 'filter' trailer< '(' arglist< none='None' ',' seq=any > ')' > [extra_trailers=trailer*] > | power< 'filter' args=trailer< '(' [any] ')' > [extra_trailers=trailer*] > zfuture_builtins.filterc C s2 | j |�rd S g }d|kr:x|d D ]}|j|j� � q$W d|kr�t|jd�j� |jd�j� |jd�j� |jd�j� �}ttj|g| dd�}n�d|kr�ttd �td �|d j� td ��}ttj|g| dd�}nTt |�r�d S |d j� }ttjtd�|gdd�}ttjtd �t |g�g| �}d|_|j|_|S )NZextra_trailersZ filter_lambda�fp�itZxp� )�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZcloner �getr �symsZpowerr r r r )�selfZnodeZresultsZtrailers�t�newr � r �0/usr/lib64/python3.6/lib2to3/fixes/fix_filter.py� transform: s4 zFixFilter.transformN)�__name__� __module__�__qualname__Z BM_compatibleZPATTERNZskip_onr r r r r r s r N)�__doc__r r Zpytreer Zpygramr r Z fixer_utilr r r r ZConditionalFixr r r r r �<module> s