1jE d d Z ddlmZ ddlmZ G d de Zi Zd dZd d Zd Z d Z d ZdS )zThe :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 ZddZd 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)clsargselementvaluess P/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/sql/annotation.pyr zAnnotated.__new__&