File: //proc/self/root/lib/python3.6/site-packages/google/protobuf/__pycache__/descriptor.cpython-36.pyc
3
8��e�� � @ s� d Z dZddlZddlZddlmZ dZej� dkr\ddlZddl Z ddl
mZ eedd�ZG d d
� d
e
�ZG dd� de�Zer�G d
d� de�ZneZG dd� de�Zej� ZG dd� deje��ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d!d"� d"e�ZG d#d$� d$e�Z d%d&� Z!d'd(� Z"d)d*� Z#d+d,� Z$d1d/d0�Z%dS )2z�Descriptors essentially contain exactly the information found in a .proto
file, in types that make this information accessible in Python.
z#robinson@google.com (Will Robinson)� N)�api_implementationF�cpp)�_message�_USE_C_DESCRIPTORSc @ s e Zd ZdZdS )�ErrorzBase error for this module.N)�__name__�
__module__�__qualname__�__doc__� r r � /usr/lib/python3.6/descriptor.pyr 3 s r c @ s e Zd ZdZdS )�TypeTransformationErrorzHError transforming between python proto type and corresponding C++ type.N)r r r r
r r r r r
7 s r
c s e Zd Z� fdd�Z� ZS )�DescriptorMetaclassc s( t t| �j|�rdS t|| j�r$dS dS )NTF)�superr �__instancecheck__�
isinstance�_C_DESCRIPTOR_CLASS)�cls�obj)� __class__r r r A s
z%DescriptorMetaclass.__instancecheck__)r r r r �
__classcell__r r )r r r @ s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �_Lockz>Wrapper class of threading.Lock(), which is allowed by 'with'.c C s t j| �}tj� |_|S )N)�object�__new__� threading�Lock�_lock)r �selfr r r r O s
z
_Lock.__new__c C s | j j� d S )N)r �acquire)r r r r � __enter__T s z_Lock.__enter__c C s | j j� d S )N)r �release)r �exc_type� exc_valueZexc_tbr r r �__exit__W s z_Lock.__exit__N)r r r r
r r r# r r r r r L s r c @ s0 e Zd ZdZerf Zdd� Zdd� Zdd� ZdS ) �DescriptorBasea� Descriptors base class.
This class is the base of all descriptor classes. It provides common options
related functionality.
Attributes:
has_options: True if the descriptor has non-default options. Usually it
is not necessary to read this -- just call GetOptions() which will
happily return the default instance. However, it's sometimes useful
for efficiency, and also useful inside the protobuf implementation to
avoid some bootstrapping issues.
c C s( || _ || _|| _|dk p |dk | _dS )z�Initialize the descriptor given its options message and the name of the
class of the options message. The name of the class is required in case
the options message is None and has to be created.
N)�_options�_options_class_name�_serialized_options�has_options)r �options�serialized_options�options_class_namer r r �__init__r s zDescriptorBase.__init__c C s || _ || _|dk | _dS )z�Sets the descriptor's options
This function is used in generated proto2 files to update descriptor
options. It must not be used outside proto2.
N)r% r&