�
��g
� �\ � d dl Zd dlZddlmZ ddlmZ dZ G d� dee� � Zd� Z d � Z
dS )
� N� )�ReprPrinter)�
StrPrinter)�Add�Infinity�Integer�Mul�NegativeInfinity�Powc �6 � � e Zd ZdZd� fd� Zd� Zd� Zd� Z� xZS )�
PythonPrinterzFA printer which converts an expression into its Python interpretation.Nc �� �� t � � � |� � g | _ g | _ t D ]2}d|z }t t |� � }t t ||� � �3d S )Nz _print_%s) �super�__init__�symbols� functions�STRPRINT�getattrr �setattrr
)�self�settings�name�f_name�f� __class__s ��e/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sympy/printing/python.pyr zPythonPrinter.__init__
sr �� �
������"�"�"������� � .� .�D� �4�'�F��
�F�+�+�A��M�6�1�-�-�-�-� .� .� c � � |j j }t t |� � s#|| j vr| j � |� � t
j | |� � S �N)�func�__name__�hasattr�sympyr �appendr �_print_Function)r �exprr s r r% zPythonPrinter._print_Function sS � ��y�!���u�d�#�#� (��D�N�(B�(B��N�!�!�$�'�'�'��)�$��5�5�5r c � � | � |� � }|| j vr| j � |� � t j | |� � S r )�_strr r$ r �
_print_Symbol)r r&