관리-도구
편집 파일: annotation.cpython-311.pyc
� �܋fE � �d � d Z ddlmZ ddlmZ G d� de� � Zi Zd d�Zd d �Zd � Z d� Z d� ZdS )z�The :class:`.Annotated` class and related routines; creates hash-equivalent copies of SQL constructs which contain context-specific markers and associations. � )� operators� )�utilc �f � e Zd ZdZd� Zd� Zd� Zd� Zdd�Zd � Z e d � � � Zd� Zd� Z d � Zd� ZdS )� AnnotatedaE clones a ClauseElement and applies an 'annotations' dictionary. Unlike regular clones, this clone also mimics __hash__() and __cmp__() of the original element so that it takes its place in hashed collections. A reference to the original element is maintained, for the important reason of keeping its hash value current. When GC'ed, the hash value may be reused, causing conflicts. .. note:: The rationale for Annotated producing a brand new class, rather than placing the functionality directly within ClauseElement, is **performance**. The __hash__() method is absent on plain ClauseElement which leads to significantly reduced function call overhead, as the use of sets and dictionaries against ClauseElement objects is prevalent, but most are not "annotated". c �� � |st � | � � S |\ }} t |j } n%# t $ r t |j | � � } Y nw xY wt � | � � S �N)�object�__new__�annotated_classes� __class__�KeyError�_new_annotation_type)�cls�args�element�valuess �P/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/sql/annotation.pyr zAnnotated.__new__&