ó
æNXc           @` sª  d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l	 m
 Z
 d Z d d d d	 g Z e e j ƒ Z e e j ƒ Z e e e j f Z d d
 „ Z d „  Z d „  Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e d d d ƒZ e d d d ƒZ e d d d ƒZ e d d d ƒZ  e d d d ƒZ! d e f d „  ƒ  YZ" d e f d „  ƒ  YZ# d e f d „  ƒ  YZ$ d S(    s«   Function signature objects for callables.

Back port of Python 3.3's function signature tools from the inspect module,
modified to be compatible with Python 2.7 and 3.2+.
i    (   t   absolute_importt   divisiont   print_functionN(   t   OrderedDicts   0.3t   BoundArgumentst	   Parametert	   Signaturet	   signaturec         C` sJ   t  |  t ƒ r@ |  j d d | f k r. |  j S|  j d |  j St |  ƒ S(   Nt   builtinst   __builtin__t   .(   t
   isinstancet   typet
   __module__t   __name__t   repr(   t
   annotationt   base_module(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   formatannotation,   s
    c         G` sr   yF |  t  k r d  St |  | ƒ } x  | D] } t | | | ƒ } q) WWn t k
 rZ d  SXt | t ƒ sn | Sd  S(   N(   R   t   getattrt   AttributeErrorR   t   _NonUserDefinedCallables(   t   clst   method_namet   nestedt   metht   name(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   _get_user_defined_method4   s    c         C` sp  t  |  ƒ s$ t d j |  ƒ ƒ ‚ n  t |  t j ƒ r† |  j d k rQ |  j }  q† t	 |  j ƒ } | j
 d t | j j ƒ  ƒ d ƒ Sn  y |  j } Wn t k
 r¦ n X| d k	 r· | Sy |  j } Wn t k
 r× n Xt	 | ƒ St |  t j ƒ rt j |  ƒ St |  t j ƒ r6t	 |  j ƒ } t | j j ƒ  ƒ } |  j pCd } |  j pRi  } y | j | | Ž  } Wn. t k
 r›} d j |  ƒ } t | ƒ ‚ n Xx | j j ƒ  D]p \ }	 }
 | |	 } |	 | k rí| j
 d |
 d t ƒ | |	 <q¬| j t  t! f k r¬| j" r¬| j# |	 ƒ q¬q¬W| j
 d | j ƒ  ƒ Sd } t |  t$ ƒ rÒt% t$ |  ƒ d ƒ } | d k	 r{t	 | ƒ } qt% |  d ƒ } | d k	 r¥t	 | ƒ } qt% |  d	 ƒ } | d k	 rt	 | ƒ } qnE t |  t& ƒ st% t$ |  ƒ d d
 ƒ } | d k	 rt	 | ƒ } qn  | d k	 r'| St |  t j' ƒ rWd j |  ƒ } t | ƒ ‚ n  t d j |  ƒ ƒ ‚ d S(   s/   Get a signature object for the passed callable.s   {0!r} is not a callable objectt
   parametersi   s,   partial object {0!r} has incorrect argumentst   defaultt   _partial_kwargt   __call__t   __new__t   __init__t   im_funcs-   no signature found for builtin function {0!r}s,   callable {0!r} is not supported by signatureN(    ((   t   callablet	   TypeErrort   formatR   t   typest
   MethodTypet   __self__t   Nonet   __func__R   t   replacet   tupleR   t   valuest   __signature__R   t   __wrapped__t   FunctionTypeR   t   from_functiont	   functoolst   partialt   funcR   t   itemst   argst   keywordst   bind_partialt
   ValueErrort	   argumentst   Truet   kindt   _VAR_KEYWORDt   _VAR_POSITIONALR   t   popR   R   R   t   BuiltinFunctionType(   t   objt   sigt   wrappedt
   new_paramst   partial_argst   partial_keywordst   bat   ext   msgt   arg_namet	   arg_valuet   paramt   callt   newt   init(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR   D   sx    &


t   _voidc           B` s   e  Z d  Z RS(   s0   A private marker - used in Parameter & Signature(   R   R   t   __doc__(    (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRP   ·   s   t   _emptyc           B` s   e  Z RS(    (   R   R   (    (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRR   »   s   t   _ParameterKindc           B` s#   e  Z d  „  Z d „  Z d „  Z RS(   c         O` s#   t  j |  | Œ } | d | _ | S(   NR   (   t   intR    t   _name(   t   selfR6   t   kwargsRA   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR    À   s    c         C` s   |  j  S(   N(   RU   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   __str__Å   s    c         C` s   d j  |  j ƒ S(   Ns   <_ParameterKind: {0!r}>(   R%   RU   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   __repr__È   s    (   R   R   R    RX   RY   (    (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRS   ¿   s   		R   t   POSITIONAL_ONLYi   t   POSITIONAL_OR_KEYWORDi   t   VAR_POSITIONALi   t   KEYWORD_ONLYi   t   VAR_KEYWORDc           B` sË   e  Z d  Z d Z e Z e Z e Z	 e
 Z e Z e Z e e e d „ Z e d „  ƒ Z e d „  ƒ Z e d	 „  ƒ Z e d
 „  ƒ Z e e e e e d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sÖ  Represents a parameter in a function signature.

    Has the following public attributes:

    * name : str
        The name of the parameter as a string.
    * default : object
        The default value for the parameter if specified.  If the
        parameter has no default value, this attribute is not set.
    * annotation
        The annotation for the parameter if specified.  If the
        parameter has no annotation, this attribute is not set.
    * kind : str
        Describes how argument values are bound to the parameter.
        Possible values: `Parameter.POSITIONAL_ONLY`,
        `Parameter.POSITIONAL_OR_KEYWORD`, `Parameter.VAR_POSITIONAL`,
        `Parameter.KEYWORD_ONLY`, `Parameter.VAR_KEYWORD`.
    RU   t   _kindt   _defaultt   _annotationR   c         C` s  | t  t t t t f k r* t d ƒ ‚ n  | |  _ | t k	 rr | t t f k rr d j | ƒ } t | ƒ ‚ qr n  | |  _	 | |  _
 | d  k r· | t  k r« t d ƒ ‚ n  | |  _ nX t | ƒ } | t  k rt j d | t j ƒ rd j | ƒ } t | ƒ ‚ n  | |  _ | |  _ d  S(   Ns,   invalid value for 'Parameter.kind' attributes)   {0} parameters cannot have default valuess<   None is not a valid name for a non-positional-only parameters
   [a-z_]\w*$s#   {0!r} is not a valid parameter name(   t   _POSITIONAL_ONLYt   _POSITIONAL_OR_KEYWORDR>   t   _KEYWORD_ONLYR=   R9   R_   RR   R%   R`   Ra   R)   RU   t   strt   ret   matcht   IR   (   RV   R   R<   R   R   R   RI   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR!   ñ   s(    				%	c         C` s   |  j  S(   N(   RU   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR     s    c         C` s   |  j  S(   N(   R`   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR     s    c         C` s   |  j  S(   N(   Ra   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR     s    c         C` s   |  j  S(   N(   R_   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR<     s    c      	   C` s   | t  k r |  j } n  | t  k r0 |  j } n  | t  k rH |  j } n  | t  k r` |  j } n  | t  k rx |  j } n  t |  ƒ | | d | d | d | ƒS(   s+   Creates a customized copy of the Parameter.R   R   R   (   RP   RU   R_   Ra   R`   R   R   (   RV   R   R<   R   R   R   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR+     s    c         C` sÕ   |  j  } |  j } | t k rE | d  k r3 d } n  d j | ƒ } n  |  j t k	 rr d j | t |  j ƒ ƒ } n  |  j t k	 rŸ d j | t	 |  j ƒ ƒ } n  | t
 k r¸ d | } n | t k rÑ d | } n  | S(   Nt    s   <{0}>s   {0}:{1}s   {0}={1}t   *s   **(   R<   RU   Rb   R)   R%   Ra   RR   R   R`   R   R>   R=   (   RV   R<   t	   formatted(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRX   4  s     				c         C` s"   d j  |  j j t |  ƒ |  j ƒ S(   Ns   <{0} at {1:#x} {2!r}>(   R%   t	   __class__R   t   idR   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRY   L  s    c         C` s%   d j  |  j j ƒ } t | ƒ ‚ d  S(   Ns   unhashable type: '{0}'(   R%   Rl   R   R$   (   RV   RI   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   __hash__P  s    c         C` sX   t  | j t ƒ oW |  j | j k oW |  j | j k oW |  j | j k oW |  j | j k S(   N(   t
   issubclassRl   R   RU   R_   R`   Ra   (   RV   t   other(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   __eq__T  s
    c         C` s   |  j  | ƒ S(   N(   Rq   (   RV   Rp   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   __ne__[  s    (   s   _names   _kinds   _defaults   _annotations   _partial_kwarg(   R   R   RQ   t	   __slots__Rb   RZ   Rc   R[   R>   R\   Rd   R]   R=   R^   RR   t   emptyt   FalseR!   t   propertyR   R   R   R<   RP   R+   RX   RY   Rn   Rq   Rr   (    (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR   Ó   s*   					c           B` s_   e  Z d  Z d „  Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z d „  Z d „  Z	 d „  Z
 RS(   s  Result of :meth:`Signature.bind` call.  Holds the mapping of arguments
    to the function's parameters.

    Has the following public attributes:

    arguments : :class:`collections.OrderedDict`
      An ordered mutable mapping of parameters' names to arguments' values.
      Does not contain arguments' default values.
    signature : :class:`Signature`
      The Signature object that created this instance.
    args : tuple
      Tuple of positional arguments values.
    kwargs : dict
      Dict of keyword arguments values.
    c         C` s   | |  _  | |  _ d  S(   N(   R:   t
   _signature(   RV   R   R:   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR!   p  s    	c         C` s   |  j  S(   N(   Rw   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR   t  s    c         C` s§   g  } x” |  j  j j ƒ  D]€ \ } } | j t t f k sC | j rG Pn  y |  j | } Wn t k
 rl Pq X| j t	 k rŒ | j
 | ƒ q | j | ƒ q Wt | ƒ S(   N(   Rw   R   R5   R<   R=   Rd   R   R:   t   KeyErrorR>   t   extendt   appendR,   (   RV   R6   t
   param_nameRL   t   arg(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR6   x  s    	c         C` sØ   i  } t  } xÅ |  j j j ƒ  D]± \ } } | sv | j t t f k sO | j rX t } qv | |  j	 k rv t } q qv n  | s‚ q n  y |  j	 | } Wn t
 k
 r¦ q X| j t k rÆ | j | ƒ q | | | <q W| S(   N(   Ru   Rw   R   R5   R<   R=   Rd   R   R;   R:   Rx   t   update(   RV   RW   t   kwargs_startedR{   RL   R|   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRW   ”  s(    			c         C` s%   d j  |  j j ƒ } t | ƒ ‚ d  S(   Ns   unhashable type: '{0}'(   R%   Rl   R   R$   (   RV   RI   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRn   ³  s    c         C` s4   t  | j t ƒ o3 |  j | j k o3 |  j | j k S(   N(   Ro   Rl   R   R   R:   (   RV   Rp   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRq   ·  s    c         C` s   |  j  | ƒ S(   N(   Rq   (   RV   Rp   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRr   ¼  s    (   R   R   RQ   R!   Rv   R   R6   RW   Rn   Rq   Rr   (    (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR   _  s   			c           B` s¶   e  Z d  Z d Z e Z e Z e Z	 d e e d „ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e e d „ Z d „  Z d	 „  Z d
 „  Z e d „ Z d „  Z d „  Z d „  Z RS(   s­  A Signature object represents the overall signature of a function.
    It stores a Parameter object for each parameter accepted by the
    function, as well as information specific to the function itself.

    A Signature object has the following public attributes:

    parameters : :class:`collections.OrderedDict`
      An ordered mapping of parameters' names to the corresponding
      Parameter objects (keyword-only arguments are in the same order
      as listed in `code.co_varnames`).
    return_annotation
      The annotation for the return type of the function if specified.
      If the function has no annotation for its return type, this
      attribute is not set.
    t   _return_annotationt   _parametersc         C` s(  | d k r t ƒ  } nú | rü t ƒ  } t } xâ t | ƒ D]» \ } } | j } | | k  r… d }	 |	 j | | j ƒ }	 t |	 ƒ ‚ n | } | j }
 |
 d k rÁ t | ƒ }
 | j	 d |
 ƒ } n  |
 | k rë d j |
 ƒ }	 t |	 ƒ ‚ n  | | |
 <q: Wn t d „  | Dƒ ƒ } | |  _
 | |  _ d S(   s„   Constructs Signature from the given list of Parameter
        objects and 'return_annotation'.  All arguments are optional.
        s%   wrong parameter order: {0} before {1}R   s   duplicate parameter name: {0!r}c         s` s   |  ] } | j  | f Vq d  S(   N(   R   (   t   .0RL   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pys	   <genexpr>ø  s   N(   R)   R   Rb   t	   enumerateR<   R%   R9   R   Re   R+   R€   R   (   RV   R   t   return_annotationt   __validate_parameters__t   paramst   top_kindt   idxRL   R<   RI   R   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR!   Ø  s0    					c         C` sÊ  t  | t j ƒ s* t d j | ƒ ƒ ‚ n  |  j } | j } | j } | j } t	 | |  ƒ } t
 | d d ƒ } | | | | !} t
 | d i  ƒ }	 | j }
 t
 | d d ƒ } |
 rÃ t |
 ƒ } n d } g  } | | } xC | |  D]7 } |	 j | t ƒ } | j | | d | d t ƒƒ qä WxY t | | ƒ D]G \ } } |	 j | t ƒ } | j | | d | d t d |
 | ƒƒ q0W| j d	 @rÊ| | | } |	 j | t ƒ } | j | | d | d t ƒƒ n  xl | D]d } t } | d k	 rþ| j | t ƒ } n  |	 j | t ƒ } | j | | d | d t d | ƒƒ qÑW| j d
 @r¨| | } | j d	 @rj| d 7} n  | | } |	 j | t ƒ } | j | | d | d t ƒƒ n  |  | d |	 j d t ƒ d t ƒS(   s2   Constructs Signature for the given python functions   {0!r} is not a Python functiont   co_kwonlyargcounti    t   __annotations__t   __kwdefaults__R   R<   R   i   i   i   Rƒ   t   returnR„   N(   R   R&   R0   R$   R%   t   _parameter_clst   __code__t   co_argcountt   co_varnamesR,   R   t   __defaults__R)   t   lent   getRR   Rz   Rc   R‚   t   co_flagsR>   Rd   R=   Ru   (   R   R4   R   t	   func_codet	   pos_countt	   arg_namest
   positionalt   keyword_only_countt   keyword_onlyt   annotationst   defaultst
   kwdefaultst   pos_default_countR   t   non_default_countR   R   t   offsetR   t   index(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR1   þ  sd    					


	c         C` s<   y t  j |  j ƒ SWn! t k
 r7 t |  j j ƒ  ƒ SXd  S(   N(   R&   t   MappingProxyTypeR€   R   R   R5   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR   G  s    c         C` s   |  j  S(   N(   R   (   RV   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRƒ   N  s    c         C` sL   | t  k r |  j j ƒ  } n  | t  k r6 |  j } n  t |  ƒ | d | ƒS(   s   Creates a customized copy of the Signature.
        Pass 'parameters' and/or 'return_annotation' arguments
        to override them in the new copy.
        Rƒ   (   RP   R   R-   R   R   (   RV   R   Rƒ   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR+   R  s    c         C` s%   d j  |  j j ƒ } t | ƒ ‚ d  S(   Ns   unhashable type: '{0}'(   R%   Rl   R   R$   (   RV   RI   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRn   a  s    c         C` s-  t  t | ƒ t ƒ sF |  j | j k sF t |  j ƒ t | j ƒ k rJ t St d „  t | j j	 ƒ  ƒ Dƒ ƒ } x· t |  j j
 ƒ  ƒ D]  \ } \ } } | j t k rß y | j | } Wn t k
 rË t SX| | k r%t Sq… y | | } Wn t k
 rt SX| | k s!| | j | k r… t Sq… Wt S(   Nc         s` s!   |  ] \ } } | | f Vq d  S(   N(    (   R   R‡   RL   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pys	   <genexpr>k  s   (   Ro   R   R   Rƒ   R‘   R   Ru   t   dictR‚   t   keysR5   R<   Rd   Rx   R;   (   RV   Rp   t   other_positionsR‡   R{   RL   t   other_paramt	   other_idx(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRq   e  s,    	(c         C` s   |  j  | ƒ S(   N(   Rq   (   RV   Rp   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRr   ƒ  s    c         C` s‘  t  ƒ  } t |  j j ƒ  ƒ } d } t | ƒ } | r~ xE |  j j ƒ  D]1 \ } }	 |	 j rF | | k rF |	 j | | <qF qF Wn  xêt rjy t | ƒ }
 Wnt	 k
 rœy t | ƒ }	 Wn t	 k
 rË PqgX|	 j
 t k rß Pqg|	 j | k r4|	 j
 t k r'd } | j d |	 j ƒ } t | ƒ ‚ n  |	 f } Pqg|	 j
 t k sR|	 j t k	 r_|	 f } Pqg| rr|	 f } Pqgd } | j d |	 j ƒ } t | ƒ ‚ q Xy t | ƒ }	 Wn t	 k
 rÌt d ƒ ‚ q X|	 j
 t t f k rñt d ƒ ‚ n  |	 j
 t k r-|
 g } | j | ƒ t | ƒ | |	 j <Pn  |	 j | k rZt d j d |	 j ƒ ƒ ‚ n  |
 | |	 j <q Wd } xÜ t j | | ƒ D]È }	 |	 j
 t k r·t d j d |	 j ƒ ƒ ‚ n  |	 j
 t k rÒ|	 } q„n  |	 j } y | j | ƒ }
 WnQ t k
 rA| rL|	 j
 t k rL|	 j t k rLt d j d | ƒ ƒ ‚ qLq„X|
 | | <q„W| r| d k	 rr| | | j <qt d ƒ ‚ n  |  j |  | ƒ S(	   s$   Private method.  Don't use directly.sA   {arg!r} parameter is positional only, but was passed as a keywordR|   s'   {arg!r} parameter lacking default values   too many positional argumentss$   multiple values for argument {arg!r}s   too many keyword arguments(    N(   R   t   iterR   R-   R5   R   R   R;   t   nextt   StopIterationR<   R>   R   Rb   R%   R$   R=   RR   Rd   Ry   R,   R)   t	   itertoolst   chainR?   Rx   t   _bound_arguments_cls(   RV   R6   RW   R3   R:   R   t   parameters_ext   arg_valsR{   RL   t   arg_valRI   R-   t   kwargs_param(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   _bind†  s    							c         O` s   |  j  | | ƒ S(   sÇ   Get a :class:`BoundArguments` object, that maps the passed `args`
        and `kwargs` to the function's signature.  Raises :exc:`TypeError`
        if the passed arguments can not be bound.
        (   R±   (   RV   R6   RW   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   bind  s    c         O` s   |  j  | | d t ƒS(   sÐ   Get a :class:`BoundArguments` object, that partially maps the
        passed `args` and `kwargs` to the function's signature.
        Raises :exc:`TypeError` if the passed arguments can not be bound.
        R3   (   R±   R;   (   RV   R6   RW   (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR8     s    c   	      C` sá   g  } t  } x‚ t |  j j ƒ  ƒ D]k \ } } t | ƒ } | j } | t k rX t } n( | t k r€ | r€ | j	 d ƒ t } n  | j	 | ƒ q" Wd j
 d j | ƒ ƒ } |  j t k	 rÝ t |  j ƒ } | d j
 | ƒ 7} n  | S(   NRj   s   ({0})s   , s    -> {0}(   R;   R‚   R   R-   Re   R<   R>   Ru   Rd   Rz   R%   t   joinRƒ   RR   R   (	   RV   t   resultt   render_kw_only_separatorR‡   RL   Rk   R<   t   renderedt   anno(    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyRX     s     "			(   s   _return_annotations   _parametersN(   R   R   RQ   Rs   R   RŒ   R   R¬   RR   Rt   R)   R;   R!   t   classmethodR1   Rv   R   Rƒ   RP   R+   Rn   Rq   Rr   Ru   R±   R²   R8   RX   (    (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyR   À  s$   %I			€		(%   RQ   t
   __future__R    R   R   Rª   R2   Rf   R&   t   collectionsR   t   __version__t   __all__R   R   t   _WrapperDescriptort   allt   _MethodWrapperR@   R   R)   R   R   R   t   objectRP   RR   RT   RS   Rb   Rc   R>   Rd   R=   R   R   R   (    (    (    sP   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/utils/signatures.pyt   <module>   s6   		sŒa