U
    L?h\                     @   s&   d Z ddlmZ eG dd dZdS )z(Trait for implementing domain elements.     )publicc                   @   s   e Zd ZdZdZdd ZdS )DomainElementz
    Represents an element of a domain.

    Mix in this trait into a class whose instances should be recognized as
    elements of a domain. Method ``parent()`` gives that domain.
     c                 C   s   t ddS )a  Get the domain associated with ``self``

        Examples
        ========

        >>> from sympy import ZZ, symbols
        >>> x, y = symbols('x, y')
        >>> K = ZZ[x,y]
        >>> p = K(x)**2 + K(y)**2
        >>> p
        x**2 + y**2
        >>> p.parent()
        ZZ[x,y]

        Notes
        =====

        This is used by :py:meth:`~.Domain.convert` to identify the domain
        associated with a domain element.
        zabstract methodN)NotImplementedError)selfr   r   S/var/www/html/venv/lib/python3.8/site-packages/sympy/polys/domains/domainelement.pyparent   s    zDomainElement.parentN)__name__
__module____qualname____doc__	__slots__r   r   r   r   r   r      s   r   N)r   Zsympy.utilitiesr   r   r   r   r   r   <module>   s   