
    \h                    ^    % S SK Jr  S SKJr  S SKrSSKJrJrJr  0 r	S\
S'   \	\S.S	 jrS
 rg)    )annotations)AnyN   )
DispatcherMethodDispatcherambiguity_warnzdict[str, Any]global_namespace)	namespaceon_ambiguityc                2   ^ ^^ [        T5      mU UU4S jnU$ )a  Dispatch function on the types of the inputs

Supports dispatch on all non-keyword arguments.

Collects implementations based on the function name.  Ignores namespaces.

If ambiguous type signatures occur a warning is raised when the function is
defined suggesting the additional method to break the ambiguity.

Examples
--------

>>> from sympy.multipledispatch import dispatch
>>> @dispatch(int)
... def f(x):
...     return x + 1

>>> @dispatch(float)
... def f(x): # noqa: F811
...     return x - 1

>>> f(3)
4
>>> f(3.0)
2.0

Specify an isolated namespace with the namespace keyword argument

>>> my_namespace = dict()
>>> @dispatch(int, namespace=my_namespace)
... def foo(x):
...     return x + 1

Dispatch on instance methods within classes

>>> class MyClass(object):
...     @dispatch(list)
...     def __init__(self, data):
...         self.data = data
...     @dispatch(int)
...     def __init__(self, datum): # noqa: F811
...         self.data = [datum]
c                  > U R                   n[        U 5      (       aC  [        R                  " 5       R                  R
                  R                  U[        U5      5      nOUT;  a  [        U5      TU'   TU   nUR                  TU TS9  U$ )N)r   )
__name__ismethodinspectcurrentframef_backf_localsgetr   r   add)funcname
dispatcherr
   r   typess      S/var/www/auris/envauris/lib/python3.13/site-packages/sympy/multipledispatch/core.py_dispatch.<locals>._;   s~    }}D>> --/66??CC &(J 9$",T"2	$"4Jud>    )tuple)r
   r   r   r   s   ``` r   dispatchr      s    X %LE Hr   c                j    [         R                  " U 5      nUR                  R                  SS5      SL$ )zIs func a method?

Note that this has to work as the method is defined but before the class is
defined.  At this stage methods look like functions.
selfN)r   	signature
parametersr   )r   r"   s     r   r   r   L   s2     !!$'I##FD1==r   )
__future__r   typingr   r   r   r   r   r   r	   __annotations__r   r    r   r   <module>r(      s3    "   D D $& . %  0n <~>r   