ó 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 petar@google.com (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] } | | | |