a
    5ghR                     @   s   d Z ddlmZ dd ZdS )z
Warning: As the name indicates, everything in this module is experimental.

The API is not final, code here may be removed or altered in breaking ways without
warning.

Use at your own risk.
   )merge_signaturesc                     sR   t | \}d fdd|D }d fddt|D }t|d| iS )a  
    Return expanded callables with unified signatures.

    Uses :func:`merge_signatures` to unify the signatures and generates function
    wrappers that accept the merged signature and call the original function in the
    correct way.

    This is best explained by an example::

        def f(x, y, z): ...

        def g(x, p): ...

        f2, g2 = expand_functions(f, g)

        # f2 is the equivalent of: def f2(x, y, z, p): return f(x, y, z)
        # g2 is the equivalent of: def g2(x, y, z, p): return g(x, p)
    ,c                    s$   g | ]}d   fdd|D qS )r   c                 3   s   | ]} | V  qd S )N ).0ivarnamesr   d/mounts/lovelace/software/anaconda3/envs/metaDMG/lib/python3.9/site-packages/iminuit/experimental.py	<genexpr>"       z&expanded.<locals>.<listcomp>.<genexpr>)join)r   mapr   r   r	   
<listcomp>"   r   zexpanded.<locals>.<listcomp>c                 3   s*   | ]"\}}d   d| d| dV  qdS )zlambda z	 : funcs[z]()Nr   )r   r   arg)totalr   r	   r
   #   s   zexpanded.<locals>.<genexpr>funcs)r   r   	enumerateeval)Z	callablesmappingargsZlambdasr   )r   r   r	   expanded   s    
r   N)__doc__utilr   r   r   r   r   r	   <module>   s   	