o
    ,wÖi
  ã                   @   sN   d Z ddlZddlmZ ddlmZ dejdejfdd„Zdejfd	d
„Z	dS )z%Functions to copy Fiddle `Buidlable`.é    N)Úconfig)Úmutate_buildableÚ	buildableÚreturnc                 K   s    t   | ¡} tj| fi |¤Ž | S )zËReturns a shallow copy of ``buildable`` with updates to arguments.

  Args:
    buildable: A ``Buildable`` (e.g. a ``fdl.Config``) to copy and mutate.
    **kwargs: The arguments and values to assign.
  )Úcopyr   Úassign©r   Úkwargs© r
   úP/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/fiddle/_src/copying.pyÚ	copy_with   s   
	r   c                 K   s    t  | ¡} tj| fi |¤Ž | S )aÕ  Returns a deep copy of ``buildable`` with updates to arguments.

  Note: if any ``Config``'s inside ``buildable`` are shared with ``Config``'s
  outside of ``buildable``, then they will no longer be shared in the returned
  value. E.g., if ``cfg1.x.y is cfg2``, then
  ``fdl.deepcopy_with(cfg1, ...).x.y is cfg2`` will be ``False``.

  Args:
    buildable: A ``Buildable`` (e.g. a ``fdl.Config``) to copy and mutate.
    **kwargs: The arguments and values to assign.
  )r   Údeepcopyr   r   r   r
   r
   r   Údeepcopy_with&   s   
r   )
Ú__doc__r   Úfiddle._srcr   Ú
config_libr   Ú
BuildableTr   Ú	Buildabler   r
   r
   r
   r   Ú<module>   s   ÿ
þ