o
    D©Ìhi  ã                   @   s   d dl Z G dd„ dƒZdS )é    Nc                   @   s6   e Zd ZdZddd„Zedd„ ƒZdd„ Zd	d
„ ZdS )ÚLazyRegexCompilerz-Descriptor to allow lazy compilation of regexr   c                 C   s   || _ || _d | _d S ©N)Ú_patternÚ_flagsÚ_compiled_regex)ÚselfÚpatternÚflags© r
   úe/var/www/html/Moveonwheels/move_on_wheels/venv/lib/python3.10/site-packages/mongoengine/base/utils.pyÚ__init__   s   
zLazyRegexCompiler.__init__c                 C   s"   | j d u rt | j| j¡| _ | j S r   )r   ÚreÚcompiler   r   )r   r
   r
   r   Úcompiled_regex   s   
z LazyRegexCompiler.compiled_regexc                 C   s   | j S r   )r   )r   ÚinstanceÚownerr
   r
   r   Ú__get__   s   zLazyRegexCompiler.__get__c                 C   s   t dƒ‚)Nz'Can not set attribute LazyRegexCompiler)ÚAttributeError)r   r   Úvaluer
   r
   r   Ú__set__   s   zLazyRegexCompiler.__set__N)r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   r   r   r
   r
   r
   r   r      s    

r   )r   r   r
   r
   r
   r   Ú<module>   s    