ó
X¾÷Xc           @   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(    (    sE   /tmp/pip-build-h1VYrz/protobuf/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   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __contains__M   s
    c         C   s
   t  |  ƒ S(   N(   t   iter(   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   iterkeysU   s    c         c   s   x |  D] } |  | Vq Wd  S(   N(    (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt
   itervaluesX   s    c         c   s$   x |  D] } | |  | f Vq Wd  S(   N(    (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt	   iteritems\   s    c         C   s
   t  |  ƒ S(   N(   t   list(   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   keys`   s    c         C   s!   g  |  D] } | |  | f ^ q S(   N(    (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   itemsc   s    c         C   s   g  |  D] } |  | ^ q S(   N(    (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/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(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __eq__l   s    c         C   s   |  | k S(   N(    (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/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   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/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(    (    sE   /tmp/pip-build-h1VYrz/protobuf/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   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/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   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/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] } | | | | <q‡ WnX t | d ƒ rÙ xF | j ƒ  D] } | | | | <q¾ Wn! x | D] \ } } | | | <qà Wx$ | j ƒ  D] \ } } | | | <qWd  S(   Ni   s8   update() takes at most 2 positional arguments ({} given)s,   update() takes at least 1 argument (0 given)i    i   R   (    (   t   lent	   TypeErrort   formatR   R    t   hasattrR   R   (   t   argst   kwdsR   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   update”   s"    	
"c         C   s.   y |  | SWn t  k
 r) | |  | <n X| S(   N(   R   (   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt
   setdefault©   s
    (    N(   R   R   R   t   objectR   R    R#   R$   R+   R   R,   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   t   s   					t   BaseContainerc           B   sY   e  Z d  Z d d g Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d	 „  Z
 RS(
   s   Base container class.t   _message_listenert   _valuesc         C   s   | |  _  g  |  _ d S(   s¹   
    Args:
      message_listener: A MessageListener implementation.
        The RepeatedScalarFieldContainer will call this object's
        Modified() method when it is modified.
    N(   R/   R0   (   R   t   message_listener(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __init__À   s    	c         C   s   |  j  | S(   s$   Retrieves item by the specified key.(   R0   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __getitem__Ê   s    c         C   s   t  |  j ƒ S(   s0   Returns the number of elements in the container.(   R%   R0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __len__Î   s    c         C   s   |  | k S(   s3   Checks if another instance isn't equal to this one.(    (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   Ò   s    c         C   s   t  d ƒ ‚ d  S(   Ns   unhashable object(   R&   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   ×   s    c         C   s   t  |  j ƒ S(   N(   t   reprR0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __repr__Ú   s    c         O   s9   d | k r" | j  d ƒ | d <n  |  j j | | Ž  d  S(   Nt   sort_functiont   cmp(   R    R0   t   sort(   R   R)   t   kwargs(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR9   Ý   s    (   R   R   t   __doc__R   R2   R3   R4   R   R   R6   R9   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR.   ¹   s   	
					t   RepeatedScalarFieldContainerc           B   s   e  Z d  Z d g Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d d	 „ Z
 d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sG   Simple, type-checked, list-like container for holding repeated scalars.t   _type_checkerc         C   s#   t  t |  ƒ j | ƒ | |  _ d S(   s,  
    Args:
      message_listener: A MessageListener implementation.
        The RepeatedScalarFieldContainer will call this object's
        Modified() method when it is modified.
      type_checker: A type_checkers.ValueChecker instance to run on elements
        inserted into this container.
    N(   t   superR<   R2   R=   (   R   R1   t   type_checker(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR2   í   s    	c         C   s<   |  j  j |  j j | ƒ ƒ |  j j s8 |  j j ƒ  n  d S(   s6   Appends an item to the list. Similar to list.append().N(   R0   t   appendR=   t
   CheckValueR/   t   dirtyt   Modified(   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR@   ù   s    c         C   s?   |  j  j | |  j j | ƒ ƒ |  j j s; |  j j ƒ  n  d S(   sE   Inserts the item at the specified position. Similar to list.insert().N(   R0   t   insertR=   RA   R/   RB   RC   (   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRD   ÿ   s    c         C   s   | d k r d Sy t | ƒ } Wn t k
 r@ | s: d S‚  n Xg  | D] } |  j j | ƒ ^ qH } | rŒ |  j j | ƒ |  j j ƒ  n  d S(   sB   Extends by appending the given iterable. Similar to list.extend().N(	   R   R	   R&   R=   RA   R0   t   extendR/   RC   (   R   t   elem_seqt   elem_seq_itert   elemt
   new_values(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRE     s    %c         C   s$   |  j  j | j  ƒ |  j j ƒ  d S(   s‰   Appends the contents of another repeated field of the same type to this
    one. We do not check the types of the individual fields.
    N(   R0   RE   R/   RC   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt	   MergeFrom  s    c         C   s!   |  j  j | ƒ |  j j ƒ  d S(   s8   Removes an item from the list. Similar to list.remove().N(   R0   t   removeR/   RC   (   R   RH   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRK     s    iÿÿÿÿc         C   s   |  j  | } |  j | ƒ | S(   sD   Removes and returns an item at a given index. Similar to list.pop().(   R0   t   __delitem__(   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR    $  s    c         C   ss   t  | t ƒ rI | j d k	 r- t d ƒ ‚ n  |  j | j | j | ƒ n& |  j j	 | ƒ |  j
 | <|  j j ƒ  d S(   s(   Sets the item on the specified position.s   Extended slices not supportedN(   R   t   slicet   stepR   t
   ValueErrort   __setslice__t   startt   stopR=   RA   R0   R/   RC   (   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __setitem__*  s    c         C   s   |  j  | | !S(   sA   Retrieves the subset of items from between the specified indices.(   R0   (   R   RQ   RR   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __getslice__4  s    c         C   sQ   g  } x' | D] } | j  |  j j | ƒ ƒ q W| |  j | | +|  j j ƒ  d S(   s<   Sets the subset of items from between the specified indices.N(   R@   R=   RA   R0   R/   RC   (   R   RQ   RR   R   RI   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRP   8  s
    c         C   s   |  j  | =|  j j ƒ  d S(   s+   Deletes the item at the specified position.N(   R0   R/   RC   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRL   @  s    
c         C   s   |  j  | | 5|  j j ƒ  d S(   s?   Deletes the subset of items from between the specified indices.N(   R0   R/   RC   (   R   RQ   RR   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __delslice__E  s    c         C   s?   |  | k r t  St | |  j ƒ r2 | j |  j k S| |  j k S(   s/   Compares the current instance with another one.(   R   R   t	   __class__R0   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   J  s
    (   R   R   R;   R   R2   R@   RD   RE   RJ   RK   R    RS   RT   RP   RL   RU   R   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR<   æ   s   								
				t   RepeatedCompositeFieldContainerc           B   st   e  Z d  Z d g Z d „  Z d „  Z d „  Z d „  Z d „  Z d d „ Z	 d	 „  Z
 d
 „  Z d „  Z d „  Z RS(   sB   Simple, list-like container for holding repeated composite fields.t   _message_descriptorc         C   s#   t  t |  ƒ j | ƒ | |  _ d S(   s‰  
    Note that we pass in a descriptor instead of the generated directly,
    since at the time we construct a _RepeatedCompositeFieldContainer we
    haven't yet necessarily initialized the type that will be contained in the
    container.

    Args:
      message_listener: A MessageListener implementation.
        The RepeatedCompositeFieldContainer will call this object's
        Modified() method when it is modified.
      message_descriptor: A Descriptor instance describing the protocol type
        that should be present in this container.  We'll use the
        _concrete_class field of this descriptor when the client calls add().
    N(   R>   RW   R2   RX   (   R   R1   t   message_descriptor(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR2   ^  s    c         K   sR   |  j  j |   } | j |  j ƒ |  j j | ƒ |  j j sN |  j j ƒ  n  | S(   s{   Adds a new element at the end of the list and returns it. Keyword
    arguments may be used to initialize the element.
    (   RX   t   _concrete_classt   _SetListenerR/   R0   R@   RB   RC   (   R   R:   t   new_element(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   addp  s    c         C   sm   |  j  j } |  j } |  j } x> | D]6 } | ƒ  } | j | ƒ | j | ƒ | j | ƒ q% W| j ƒ  d S(   s{   Extends by appending the given sequence of elements of the same type
    as this one, copying each individual message.
    N(   RX   RZ   R/   R0   R[   RJ   R@   RC   (   R   RF   t   message_classt   listenerR   t   messageR\   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRE   {  s    			c         C   s   |  j  | j ƒ d S(   sv   Appends the contents of another repeated field of the same type to this
    one, copying each individual message.
    N(   RE   R0   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRJ   ‰  s    c         C   s!   |  j  j | ƒ |  j j ƒ  d S(   s8   Removes an item from the list. Similar to list.remove().N(   R0   RK   R/   RC   (   R   RH   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRK     s    iÿÿÿÿc         C   s   |  j  | } |  j | ƒ | S(   sD   Removes and returns an item at a given index. Similar to list.pop().(   R0   RL   (   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR    ”  s    c         C   s   |  j  | | !S(   sA   Retrieves the subset of items from between the specified indices.(   R0   (   R   RQ   RR   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRT   š  s    c         C   s   |  j  | =|  j j ƒ  d S(   s+   Deletes the item at the specified position.N(   R0   R/   RC   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRL   ž  s    
c         C   s   |  j  | | 5|  j j ƒ  d S(   s?   Deletes the subset of items from between the specified indices.N(   R0   R/   RC   (   R   RQ   RR   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRU   £  s    c         C   sA   |  | k r t  St | |  j ƒ s1 t d ƒ ‚ n  |  j | j k S(   s/   Compares the current instance with another one.sS   Can only compare repeated composite fields against other repeated composite fields.(   R   R   RV   R&   R0   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   ¨  s
    (   R   R   R;   R   R2   R]   RE   RJ   RK   R    RT   RL   RU   R   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRW   W  s   									t	   ScalarMapc           B   s›   e  Z d  Z d d d d d g Z d „  Z d „  Z d „  Z d d	 „ Z d
 „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sG   Simple, type-checked, dict-like container for holding repeated scalars.t   _key_checkert   _value_checkerR0   R/   t   _entry_descriptorc         C   s1   | |  _  | |  _ | |  _ | |  _ i  |  _ d S(   sÓ  
    Args:
      message_listener: A MessageListener implementation.
        The ScalarMap will call this object's Modified() method when it
        is modified.
      key_checker: A type_checkers.ValueChecker instance to run on keys
        inserted into this container.
      value_checker: A type_checkers.ValueChecker instance to run on values
        inserted into this container.
      entry_descriptor: The MessageDescriptor of a map entry: key and value.
    N(   R/   Rb   Rc   Rd   R0   (   R   R1   t   key_checkert   value_checkert   entry_descriptor(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR2   º  s
    				c         C   sV   y |  j  | SWn@ t k
 rQ |  j j | ƒ } |  j j ƒ  } | |  j  | <| SXd  S(   N(   R0   R   Rb   RA   Rc   t   DefaultValue(   R   R   t   val(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR3   Í  s    c         C   s   |  j  j | ƒ | |  j k S(   N(   Rb   RA   R0   (   R   t   item(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   Ö  s    c         C   s   | |  k r |  | S| Sd  S(   N(    (   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   ß  s    c         C   sB   |  j  j | ƒ } |  j j | ƒ } | |  j | <|  j j ƒ  d  S(   N(   Rb   RA   Rc   R0   R/   RC   (   R   R   R   t   checked_keyt   checked_value(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRS   å  s    c         C   s   |  j  | =|  j j ƒ  d  S(   N(   R0   R/   RC   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRL   ë  s    
c         C   s   t  |  j ƒ S(   N(   R%   R0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR4   ï  s    c         C   s   t  |  j ƒ S(   N(   R	   R0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   __iter__ò  s    c         C   s   t  |  j ƒ S(   N(   R5   R0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR6   õ  s    c         C   s$   |  j  j | j  ƒ |  j j ƒ  d  S(   N(   R0   R+   R/   RC   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRJ   ø  s    c         C   s&   |  j  } | j ƒ  |  _  d  | d  <d  S(   N(   R0   t   copyR   (   R   t   original(    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   InvalidateIteratorsü  s    	c         C   s   |  j  j ƒ  |  j j ƒ  d  S(   N(   R0   R$   R/   RC   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR$     s    c         C   s
   |  j  j S(   N(   Rd   RZ   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   GetEntryClass  s    N(   R   R   R;   R   R2   R3   R   R   R   RS   RL   R4   Rm   R6   RJ   Rp   R$   Rq   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRa   ²  s    														t
   MessageMapc           B   s¤   e  Z d  Z d d d d d g Z d „  Z d „  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(   sE   Simple, type-checked, dict-like container for with submessage values.Rb   R0   R/   RX   Rd   c         C   s1   | |  _  | |  _ | |  _ | |  _ i  |  _ d S(   sÓ  
    Args:
      message_listener: A MessageListener implementation.
        The ScalarMap will call this object's Modified() method when it
        is modified.
      key_checker: A type_checkers.ValueChecker instance to run on keys
        inserted into this container.
      value_checker: A type_checkers.ValueChecker instance to run on values
        inserted into this container.
      entry_descriptor: The MessageDescriptor of a map entry: key and value.
    N(   R/   RX   Rb   Rd   R0   (   R   R1   RY   Re   Rg   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR2     s
    				c         C   ss   y |  j  | SWn] t k
 rn |  j j | ƒ } |  j j ƒ  } | j |  j ƒ | |  j  | <|  j j ƒ  | SXd  S(   N(	   R0   R   Rb   RA   RX   RZ   R[   R/   RC   (   R   R   R\   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR3   '  s    c         C   s   |  | S(   sa  get_or_create() is an alias for getitem (ie. map[key]).

    Args:
      key: The key to get or create in the map.

    This is useful in cases where you want to be explicit that the call is
    mutating the map.  This can avoid lint errors for statements like this
    that otherwise would appear to be pointless statements:

      msg.my_map[key]
    (    (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   get_or_create3  s    c         C   s   | |  k r |  | S| Sd  S(   N(    (   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   D  s    c         C   s   | |  j  k S(   N(   R0   (   R   Rj   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR   J  s    c         C   s   t  d ƒ ‚ d  S(   Ns5   May not set values directly, call my_map[key].foo = 5(   RO   (   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRS   M  s    c         C   s   |  j  | =|  j j ƒ  d  S(   N(   R0   R/   RC   (   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRL   P  s    
c         C   s   t  |  j ƒ S(   N(   R%   R0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR4   T  s    c         C   s   t  |  j ƒ S(   N(   R	   R0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRm   W  s    c         C   s   t  |  j ƒ S(   N(   R5   R0   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR6   Z  s    c         C   s@   x9 | D]1 } | |  k r# |  | =n  |  | j  | | ƒ q Wd  S(   N(   t   CopyFrom(   R   R   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRJ   ]  s    
c         C   s&   |  j  } | j ƒ  |  _  d  | d  <d  S(   N(   R0   Rn   R   (   R   Ro   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRp   g  s    	c         C   s   |  j  j ƒ  |  j j ƒ  d  S(   N(   R0   R$   R/   RC   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyR$   o  s    c         C   s
   |  j  j S(   N(   Rd   RZ   (   R   (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRq   s  s    N(   R   R   R;   R   R2   R3   Rs   R   R   R   RS   RL   R4   Rm   R6   RJ   Rp   R$   Rq   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyRr     s"   											
		(   R;   t
   __author__R   t   syst   version_infoR-   R    R   t   registerR.   R<   t   MutableSequenceRW   Ra   Rr   (    (    (    sE   /tmp/pip-build-h1VYrz/protobuf/google/protobuf/internal/containers.pyt   <module>(   s   0<	-n[Z