| Server IP : 217.160.0.135 / Your IP : 216.73.217.25 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/pythran/transformations/__pycache__/ |
Upload File : |
�
cR�a_ � �F � d Z ddlmZ ddlmZ ddlZ G d� de� � ZdS )zJ
ExtractDocStrings fills a dictionary with doc strings for each function.
� )�Transformation)�isstrNc �D � � e Zd ZdZ� fd�Z� fd�Zd� Zd� Zd� Zd� Z � xZ
S )�ExtractDocStringsa�
Extract Python Doc Strings, removing them from the AST and putting them in
a dictionary for later use.
>>> import gast as ast
>>> from pythran import passmanager, backend
>>> node = ast.parse("def foo(): 'my doc is cool' ; pass")
>>> pm = passmanager.PassManager("test")
>>> _ = pm.apply(ExtractDocStrings, node)
>>> print(pm.dump(backend.Python, node))
def foo():
pass
c �| �� t t | � � � � � t � � | _ d S �N)�superr �__init__�dict�
docstrings)�self� __class__s ��M/usr/lib/python3/dist-packages/pythran/transformations/extract_doc_strings.pyr
zExtractDocStrings.__init__ s/ �� �
���&�&�/�/�1�1�1��&�&����� c �b �� t t | � � � |� � | j S r )r r �runr )r
�noder s �r r zExtractDocStrings.run s* �� �
���&�&�*�*�4�0�0�0���r c �2 � t |j � � rdS |S )zRemove other top-level stringsN)r �value�r
r s r �
visit_ExprzExtractDocStrings.visit_Expr"