� S�Ljc @ s d Z d Z d d l Z d d l Z e j d d k r� d e f d � � YZ d e f d � � YZ e j j e � e j j e � n e j Z d e f d � � YZ d e f d � � YZ e j j e � d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( s� Contains container classes to represent different protocol buffer types. This file defines container classes which represent categories of protocol buffer field types which need extra maintenance. Currently these categories are: - Repeated scalar fields - These are all repeated fields which aren't composite (e.g. they are of simple types like int32, string, etc). - Repeated composite fields - Repeated fields which are composite. This includes groups and nested messages. s [email protected] (Petar Petrov)i����Ni i t Mappingc B sq e Z d Z d d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d Z d � Z d � Z RS( c C s% y | | SWn t k r | SXd S( N( t KeyError( t selft keyt default( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt getG s c C s) y | | Wn t k r t SXt Sd S( N( R t Falset True( R R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt __contains__M s c C s t | � S( N( t iter( R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt iterkeysU s c c s x | D] } | | Vq Wd S( N( ( R R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt itervaluesX s c c s$ x | D] } | | | f Vq Wd S( N( ( R R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt iteritems\ s c C s t | � S( N( t list( R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt keys` s c C s! g | D] } | | | f ^ q S( N( ( R R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt itemsc s c C s g | D] } | | ^ q S( N( ( R R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt valuesf s c C s8 t | t j � s t St | j � � t | j � � k S( N( t isinstancet collectionsR t NotImplementedt dictR ( R t other( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt __eq__l s c C s | | k S( N( ( R R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt __ne__q s ( N( t __name__t __module__t __slots__t NoneR R R R R R R R t __hash__R R ( ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyR D s t MutableMappingc B sJ e Z d Z e � Z e d � Z d � Z d � Z d � Z d d � Z RS( c C sG y | | } Wn' t k r7 | | j k r3 � n | SX| | =| Sd S( N( R t _MutableMapping__marker( R R R t value( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt popy s c C sK y t t | � � } Wn t k r/ t � n X| | } | | =| | f S( N( t nextR t StopIterationR ( R R R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt popitem� s c C s3 y x t r | j � q WWn t k r. n Xd S( N( R R# R ( R ( ( sG /usr/lib/python2.7/site-packages/google/protobuf/internal/containers.pyt clear� s c O s% t | � d k r0 t d j t | � � � � n | sE t d � � n | d } t | � d k rk | d n d } t | t � r� xw | D] } | | | |