a
    RG5d>  ã                   @   sb   d Z ddlmZ ddddddddddd	d
dœZi Zedd„ ƒZddd„Zdd„ Zdd„ Zeƒ  dS )z@Configuration utilities for polynomial manipulation algorithms. é    )ÚcontextmanagerFTé   é   é   ÚrabinÚ
zassenhausZ
buchberger)ÚUSE_COLLINS_RESULTANTÚUSE_SIMPLIFY_GCDÚUSE_HEU_GCDZUSE_IRREDUCIBLE_IN_FACTORZUSE_CYCLOTOMIC_FACTORZEEZ_RESTART_IF_NEEDEDZEEZ_NUMBER_OF_CONFIGSZEEZ_NUMBER_OF_TRIESZEEZ_MODULUS_STEPÚGF_IRRED_METHODÚGF_FACTOR_METHODZGROEBNERc                  k   s<   |   ¡ D ]\}}t||ƒ qd V  |  ¡ D ]}t|ƒ q*d S )N)ÚitemsÚsetupÚkeys)ÚkwargsÚkÚv© r   úR/var/www/html/django/DPS/env/lib/python3.9/site-packages/sympy/polys/polyconfig.pyÚusing   s
    r   Nc                 C   s*   |   ¡ } |dur|t| < nt|  t| < dS )z3Assign a value to (or reset) a configuration item. N)ÚupperÚ_current_configÚ_default_config)ÚkeyÚvaluer   r   r   r   %   s    
r   c                 C   s   t  |  ¡ d¡S )z1Ask for a value of the given configuration item. N)r   Úgetr   )r   r   r   r   Úquery/   s    r   c               	   C   sl   ddl m}  t ¡ D ]R\}}| d| ƒ}|dur^zt|ƒt|< W qf tyZ   |t|< Y qf0 q|t|< qdS )z+Initialized configuration of polys module. r   )ÚgetenvZSYMPY_N)Úosr   r   r   Úevalr   Ú	NameError)r   r   Údefaultr   r   r   r   Ú	configure4   s    r"   )N)	Ú__doc__Ú
contextlibr   r   r   r   r   r   r"   r   r   r   r   Ú<module>   s*   ð
	

