%PDF- %PDF-
Direktori : /lib/python3/dist-packages/zope/interface/__pycache__/ |
Current File : //lib/python3/dist-packages/zope/interface/__pycache__/declarations.cpython-312.pyc |
� ��e�� � �t � d Z dZddlZddlmZ ddlmZ ddlmZ ddlZddlm Z ddlm Z dd lmZ dd lmZ ddlm Z ddlmZ g Zi Zd � Z G d� d� Z G d� de� Z G d� de� Z G d� de e� Zd� Zd� Zed� � Zd� Zd� Zd� Zd7d�Zd� Z G d� d� Z G d � d!� Z G d"� d#e� Z!e!Z" ejF � Z$d$� Z!d%e!_% d&� Z&d'� Z'd(� Z(e G d)� d*e� � Z) G d+� d,ee)� Z*d-� Z+ G d.� d/� Z,d0� Z-d1� Z.ed2� � Z/ed3� � Z0e G d4� d5� � Z1d8d6�Z2 e� Z3 e1� Z4y)9a� Implementation of interface declarations There are three flavors of declarations: - Declarations are used to simply name declared interfaces. - ImplementsDeclarations are used to express the interfaces that a class implements (that instances of the class provides). Implements specifications support inheriting interfaces. - ProvidesDeclarations are used to express interfaces directly provided by objects. �restructuredtext� N)�FunctionType)� MethodType)� ModuleType)� Interface)�InterfaceClass)�SpecificationBase)� Specification)�NameAndModuleComparisonMixin)�_use_c_implc �| � | j }| j }|j }||j |� dz }|S )N� )�__self_class__� __thisclass__�__mro__�index)�ob� self_class�class_that_invoked_super�complete_mro� next_classs �=/usr/lib/python3/dist-packages/zope/interface/declarations.py�_next_super_classr 5 sG � � �"�"�J�!�/�/���%�%�L��l�0�0�1I�J�Q�N�O�J��� c � � e Zd Zd� Zd� Zy)�namedc � � || _ y �N)�name)�selfr s r �__init__znamed.__init__A s � ��� r c �( � | j |_ |S r )r �__component_name__�r r s r �__call__znamed.__call__D s � � $� � ���� r N)�__name__� __module__�__qualname__r! r% � r r r r ? s � ��r r c �\ � e Zd ZdZdZd� Zd� Zd� Zd� Zd� Z d� Z e Zed � � Z ed � � Zy)�DeclarationzInterface declarationsr) c �B � t j | t |� � y r )r r! �_normalizeargs)r �basess r r! zDeclaration.__init__N s � ����t�^�E�%:�;r c �L � | j |� xr || j � v S )z:Test whether an interface is in the specification )�extends� interfaces)r � interfaces r �__contains__zDeclaration.__contains__Q s$ � � �|�|�I�&�I�9����8I�+I�Ir c �"