U
    ZÊ¹jÕ  ã                   @   s   d Z dgZG dd„ dƒZdS )zÛMixin classes for sharing functionality between unrelated classes.

This module is named with a leading underscore to signify to users that it's
"private" and only intended for internal use by the biomechanics module.

Ú_NamedMixinc                   @   s8   e Zd ZdZeedœdd„ƒZejeddœdd„ƒZdS )r   ao  Mixin class for adding `name` properties.

    Valid names, as will typically be used by subclasses as a suffix when
    naming automatically-instantiated symbol attributes, must be nonzero length
    strings.

    Attributes
    ==========

    name : str
        The name identifier associated with the instance. Must be a string of
        length at least 1.

    )Úreturnc                 C   s   | j S )z,The name associated with the class instance.)Ú_name)Úself© r   ú`/var/www/html/bwave/python/venv/lib/python3.8/site-packages/sympy/physics/biomechanics/_mixin.pyÚname   s    z_NamedMixin.nameN)r   r   c                 C   sˆ   t | dƒr"dt|ƒ› d�}t|ƒ‚t|tƒsTdt|ƒ› dt|ƒ› dt› d�}t|ƒ‚|dkr~dt|ƒ› d	ttƒ› d�}t|ƒ‚|| _d S )
Nr   zCan't set attribute `name` to z as it is immutable.zName z passed to `name` was of type z
, must be Ú.>   Ú z& is invalid, must be a nonzero length )	ÚhasattrÚreprÚAttributeErrorÚ
isinstanceÚstrÚtypeÚ	TypeErrorÚ
ValueErrorr   )r   r   Úmsgr   r   r   r   !   s    
ÿ
ÿÿ)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   Úsetterr   r   r   r   r      s
   N)r   Ú__all__r   r   r   r   r   Ú<module>   s   