Format: application/x-python-code
⬇ Download File (27.1 KB)
   1  o
   2  
   3  ��h5y�	@s�UdZddlmZddlZddlZddlZddlZddlZddlm	Z	ddl
   4  mZddlm
   5  Z
   6  ddlmZddlmZdd	lmZdd
   7  lmZgd�ZdZee�d
   8  ��Zdqdd�ZeGdd�de
   9  ��Zdd�Zdddefdd�Zdddefdd�ZGdd�de �Z!Gdd�de!�Z"dd �Z#Gd!d"�d"e"�Z$Gd#d$�d$e �Z%Gd%d&�d&e%�Z&Gd'd(�d(e%�Z'Gd)d*�d*e%�Z(Gd+d,�d,e �Z)Gd-d.�d.�Z*Gd/d0�d0�Z+Gd1d2�d2�Z,d3d4�Z-d5d6�Z.d7d8�Z/d9d:�Z0d;d<�Z1Gd=d>�d>�Z2d?d@�Z3dAdB�Z4dCdD�Z5dEdF�Z6dGdH�Z7dIdJ�Z8ee9dK<ze:Z;Wne<�ye=Z;Ynwie>e6�e?e6�e@e6�eAe.dLdM��eBe.dNdO��eCe0dPdQ��eDe/dPdQ��eEe/dRdS��eFe1�ee3�ee5�ejGe7�ejHe7�ejIe6�ejJe4�eje6�ejKe6�e;e8i�ZLeejM�ZNeNeCu�rye0dTdQ�eLeN<e0dUdS�eLejO<e6eLeP<e6eLeQ<e6eLeR<iZSee9dV<dWdX�ZTdYdZ�ZUeC�VeWeXdd[deYeZg�e6�Z[d\d]�Z\d^d_�Z]d`da�Z^dbdc�Z_ddde�Z`eUdfdge\�eUdfdhe]�eUdfdie^�eUdfdje_�eUdfdke`�eadlk�r�ddmlbmcZcGdndo�doe �Zdeed�d[dp�dSdS)ra�
  10  
  11  Python advanced pretty printer.  This pretty printer is intended to
  12  replace the old `pprint` python module which does not allow developers
  13  to provide their own pretty print callbacks.
  14  
  15  This module is based on ruby's `prettyprint.rb` library by `Tanaka Akira`.
  16  
  17  
  18  Example Usage
  19  -------------
  20  
  21  To directly print the representation of an object use `pprint`::
  22  
  23      from pretty import pprint
  24      pprint(complex_object)
  25  
  26  To get a string of the output use `pretty`::
  27  
  28      from pretty import pretty
  29      string = pretty(complex_object)
  30  
  31  
  32  Extending
  33  ---------
  34  
  35  The pretty library allows developers to add pretty printing rules for their
  36  own objects.  This process is straightforward.  All you have to do is to
  37  add a `_repr_pretty_` method to your object and call the methods on the
  38  pretty printer passed::
  39  
  40      class MyObject(object):
  41  
  42          def _repr_pretty_(self, p, cycle):
  43              ...
  44  
  45  Here's an example for a class with a simple constructor::
  46  
  47      class MySimpleObject:
  48  
  49          def __init__(self, a, b, *, c=None):
  50              self.a = a
  51              self.b = b
  52              self.c = c
  53  
  54          def _repr_pretty_(self, p, cycle):
  55              ctor = CallExpression.factory(self.__class__.__name__)
  56              if self.c is None:
  57                  p.pretty(ctor(a, b))
  58              else:
  59                  p.pretty(ctor(a, b, c=c))
  60  
  61  Here is an example implementation of a `_repr_pretty_` method for a list
  62  subclass::
  63  
  64      class MyList(list):
  65  
  66          def _repr_pretty_(self, p, cycle):
  67              if cycle:
  68                  p.text('MyList(...)')
  69              else:
  70                  with p.group(8, 'MyList([', '])'):
  71                      for idx, item in enumerate(self):
  72                          if idx:
  73                              p.text(',')
  74                              p.breakable()
  75                          p.pretty(item)
  76  
  77  The `cycle` parameter is `True` if pretty detected a cycle.  You *have* to
  78  react to that or the result is an infinite loop.  `p.text()` just adds
  79  non breaking text to the output, `p.breakable()` either adds a whitespace
  80  or breaks here.  If you pass it an argument it's used instead of the
  81  default space.  `p.pretty` prettyprints another object using the pretty print
  82  method.
  83  
  84  The first parameter to the `group` function specifies the extra indentation
  85  of the next line.  In this example the next item will either be on the same
  86  line (if the items are short enough) or aligned with the right edge of the
  87  opening bracket of `MyList`.
  88  
  89  If you just want to indent something you can use the group function
  90  without open / close parameters.  You can also use this code::
  91  
  92      with p.indent(2):
  93          ...
  94  
  95  Inheritance diagram:
  96  
  97  .. inheritance-diagram:: IPython.lib.pretty
  98     :parts: 3
  99  
 100  :copyright: 2007 by Armin Ronacher.
 101              Portions (c) 2009 by Robert Kern.
 102  :license: BSD License.
 103  �)�contextmanagerN)�deque)�	signature)�StringIO)�warn)�undoc)�PYPY)�Dict)	�pretty�pprint�
 104  PrettyPrinter�RepresentationPrinter�for_type�for_type_by_name�RawText�RawStringLiteral�CallExpressioni��cCs&zt|||�WSty|YSw)zzSafe version of getattr.
 105  
 106      Same as getattr, but will return ``default`` on any Exception,
 107      rather than raising.
 108      )�getattr�	Exception)�obj�attr�default�r�Hc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/lib/pretty.py�
 109  _safe_getattrws
 110  �rcseZdZ�fdd�Z�ZS)�
 111  CUnicodeIOcs$t�j|i|��tdtdd�dS)NzKCUnicodeIO is deprecated since IPython 6.0. Please use io.StringIO instead.�)�
 112  stacklevel)�super�__init__r�DeprecationWarning)�self�args�kwargs��	__class__rrr �s
 113  �zCUnicodeIO.__init__)�__name__�
 114  __module__�__qualname__r �
 115  __classcell__rrr%rr�srcCsPt|�}zt|�WSty'z	t|td�WYSty&|YYSww)z�
 116      Sort the given items for pretty printing. Since some predictable
 117      sorting is better than no sorting at all, we sort on the string
 118      representation if normal sorting fails.
 119      )�key)�list�sortedr�str)�itemsrrr�_sorted_for_pprint�s
 120  ��r0F�O�
 121  cCs2t�}t|||||d�}|�|�|��|��S)z3
 122      Pretty print the object's representation.
 123      ��max_seq_length)rr
 124  r
 125  �flush�getvalue)r�verbose�	max_width�newliner4�stream�printerrrrr
 126  �s
 127  
 128  r
 129  cCs@ttj||||d�}|�|�|��tj�|�tj��dS)z,
 130      Like `pretty` but print to stdout.
 131      r3N)r
 132  �sys�stdoutr
 133  r5�write)rr7r8r9r4r;rrrr�s
 134  
 135  rc@s&eZdZedd��Zeddd��ZdS)	�_PrettyPrinterBasec	cs<�|j|7_z
 136  dVW|j|8_dS|j|8_w)z/with statement support for indenting/dedenting.N)�indentation)r"�indentrrrrA�s
 137  �"z_PrettyPrinterBase.indentrrc
 138  cs6�|�||�zdVW|�||�dS|�||�w)z8like begin_group / end_group but for the with statement.N)�begin_group�	end_group)r"rA�open�closerrr�group�s
 139  �z_PrettyPrinterBase.groupN)rrr)r'r(r)rrArFrrrrr?�s
 140  
 141  r?c@sneZdZdZddefdd�Zdd�Zdd	�Zd
 142  d�Zdd
 143  d�Z	dd�Z
 144  ddd�Zdd�Zddd�Z
 145  dd�ZdS)ra
 146      Baseclass for the `RepresentationPrinter` prettyprinter that is used to
 147      generate pretty reprs of objects.  Contrary to the `RepresentationPrinter`
 148      this printer knows nothing about the default pprinters or the `_repr_pretty_`
 149      callback method.
 150      r1r2cCsP||_||_||_||_d|_d|_t�|_td�}|g|_	t
 151  |�|_d|_dS�Nr)
 152  �outputr8r9r4�output_width�buffer_widthr�buffer�Group�group_stack�
 153  GroupQueue�group_queuer@)r"rHr8r9r4Z
 154  root_grouprrrr �s
 155  
 156  zPrettyPrinter.__init__cCs�|jr|j��}|�|j|j�|_|j|j8_|js|jrJt|jdt�rN|j��}|�|j|j�|_|j|j8_|jrLt|jdt�s'dSdSdSdSrG)	�
 157  breakablesrK�popleftrHrIrJ�width�
 158  isinstance�Text)r"rF�xrrr�_break_one_group�s
 159  �
 160  &�zPrettyPrinter._break_one_groupcCsH|j|j|jkr"|j��}|sdS|�|�|j|j|jks	dSdS�N)r8rIrJrO�deqrV�r"rFrrr�_break_outer_groups�s
 161  
 162  �z!PrettyPrinter._break_outer_groupscCsxt|�}|jr-|jd}t|t�st�}|j�|�|�||�|j|7_|��dS|j�	|�|j
 163  |7_
 164  dS)zAdd literal text to the output.�����N)�lenrKrSrT�append�addrJrZrHr>rI)r"rrR�textrrrr_�s
 165  
 166  zPrettyPrinter.text� cCs�t|�}|jd}|jr)|��|j�|j�|j�d|j�|j|_d|_	dS|j
 167  �t|||��|j	|7_	|�
 168  �dS)z�
 169          Add a breakable separator to the output.  This does not mean that it
 170          will automatically break here.  If no breaking on this position takes
 171          place the `sep` is inserted which default to one space.
 172          r[r`rN)r\rM�
 173  want_breakr5rHr>r9r@rIrJrKr]�	BreakablerZ)r"�seprRrFrrr�	breakable�s
 174  
 175  zPrettyPrinter.breakablecCsR|j��}|r|�|�|��|j�|j�|j�d|j�|j|_d|_	dS)z_
 176          Explicitly insert a newline into the output, maintaining correct indentation.
 177          r`rN)
 178  rOrXrVr5rHr>r9r@rIrJrYrrr�break_s
 179  
 180  
 181  zPrettyPrinter.break_rrcCsL|r|�|�t|jdjd�}|j�|�|j�|�|j|7_dS)z�
 182          Begin a group.
 183          The first parameter specifies the indentation for the next line (usually
 184          the width of the opening text), the second the opening text.  All
 185          parameters are optional.
 186          r[�N)r_rLrM�depthr]rO�enqr@)r"rArDrFrrrrBs
 187  zPrettyPrinter.begin_groupccsT�t|�D]"\}}|jr"||jkr"|�d�|��|�d�dS||fVqdS)z>like enumerate, but with an upper limit on the number of items�,�...N)�	enumerater4r_rd)r"�seq�idxrUrrr�
 188  _enumerate's�
 189  
 190  �zPrettyPrinter._enumeratecCs@|j|8_|j��}|js|j�|�|r|�|�dSdS)z0End a group. See `begin_group` for more details.N)r@rM�poprPrO�remover_)r"�dedentrErFrrrrC1s
 191  �zPrettyPrinter.end_groupcCs:|jD]}|j|�|j|j�7_q|j��d|_dS)z&Flush data that is left in the buffer.rN)rKrIrH�clearrJ)r"�datarrrr5:s
 192  
 193  
 194  zPrettyPrinter.flushN)r`)rr)r'r(r)�__doc__�MAX_SEQ_LENGTHr rVrZr_rdrerBrnrCr5rrrrr�s
 195  
 196  
 197  
 198  
 199  	rcCsXt|d�s'zt|j|tfi�}Wn
 200  ty|g}Y|Sw|jdd�}|S|j}|S)z| Get a reasonable method resolution order of a class and its superclasses
 201      for both old-style and new-style classes.
 202      �__mro__rfr[)�hasattr�typer'�object�	TypeErrorrv)�	obj_class�mrorrr�_get_mroBs
 203  ��r}c@s8eZdZdZddddddefdd�Zdd	�Zd
 204  d�ZdS)r
 205  a
 206      Special pretty printer that has a `pretty` method that calls the pretty
 207      printer for a python object.
 208  
 209      This class stores processing data on `self` so you must *never* use
 210      this class in a threaded environment.  Always lock it or reinstanciate
 211      it.
 212  
 213      Instances also have a verbose flag callbacks can access to control their
 214      output.  For example the default instance repr prints all attributes and
 215      methods that are not prefixed by an underscore if the printer is in
 216      verbose mode.
 217      Fr1r2Nc		Csftj|||||d�||_g|_|durt��}||_|dur#t��}||_|dur.t	��}||_
 218  dS)Nr3)rr r7�stack�_singleton_pprinters�copy�singleton_pprinters�_type_pprinters�type_pprinters�_deferred_type_pprinters�deferred_pprinters)	r"rHr7r8r9r�r�r�r4rrrr ds
 219  zRepresentationPrinter.__init__c	Cs�t|�}||jv}|j�|�|��z�t|dd�pt|�}z|j|}Wnttfy0Ynw||||�W|�	�|j�
 220  �St|�D]x}||jvra|j||||�W|�	�|j�
 221  �S|�
 222  |�}|dur|||||�W|�	�|j�
 223  �Sd|jvr�|j}t|�r�||||�W|�	�|j�
 224  �S|tur�d|jvr�tt|dd��r�t|||�W|�	�|j�
 225  �SqEt|||�W|�	�|j�
 226  �S|�	�|j�
 227  �w)zPretty print the given object.r&N�
 228  _repr_pretty_�__repr__)�idr~r]rBrrxr�rz�KeyErrorrCror}r��_in_deferred_types�__dict__r��callablery�_repr_pprint�_default_pprint)r"r�obj_id�cycler{r;�cls�methrrrr
 229  usV
 230  �$�
 231  
 232  �
 233  ��
 234  ����zRepresentationPrinter.prettycCsHt|dd�}t|dd�}||f}d}||jvr"|j�|�}||j|<|S)a
 235          Check if the given class is specified in the deferred type registry.
 236  
 237          Returns the printer from the registry if it exists, and None if the
 238          class is not in the registry. Successful matches will be moved to the
 239          regular type registry for future use.
 240          r(Nr')rr�ror�)r"r��mod�namer+r;rrrr��s
 241  
 242  z(RepresentationPrinter._in_deferred_types)r'r(r)rtrur r
 243  r�rrrrr
 244  Us
 245  �5r
 246  c@�eZdZdd�ZdS)�	PrintablecCs|SrWr�r"r:rIrrrrH�szPrintable.outputN)r'r(r)rHrrrrr���r�c@s$eZdZdd�Zdd�Zdd�ZdS)rTcCsg|_d|_dSrG)�objsrR�r"rrrr �s
 247  z
 248  Text.__init__cCs |jD]}|�|�q||jSrW)r�r>rR)r"r:rIrrrrrH�s
 249  
 250  zText.outputcCs|j�|�|j|7_dSrW)r�r]rR)r"rrRrrrr^�szText.addN)r'r(r)r rHr^rrrrrT�srTc@�eZdZdd�Zdd�ZdS)rbcCs8||_||_||_|j|_|jd|_|jj�|�dS)Nr[)rrRr
 251  r@rMrFrPr])r"rlrRr
 252  rrrr �szBreakable.__init__cCsf|jj��|jjr|�|jj�|�d|j�|jS|jjs(|jj�	|j�|�|j
 253  �||jS)Nr`)rFrPrQrar>r
 254  r9r@rOrprrRr�rrrrH�s
 255  zBreakable.outputN)r'r(r)r rHrrrrrb�srbc@r�)rLcCs||_t�|_d|_dS)NF)rgrrPra)r"rgrrrr �s
 256  zGroup.__init__N)r'r(r)r rrrrrL�r�rLc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
 257  rNcGsg|_|D]}|�|�qdSrW)�queuerh)r"�groupsrFrrrr �s�zGroupQueue.__init__cCsJ|j}|t|j�dkr|j�g�|t|j�dks|j|�|�dS)Nrf)rgr\r�r])r"rFrgrrrrh�s
 258  �zGroupQueue.enqcCs^|jD])}tt|��D]\}}|jr||=d|_|Sq|D]}d|_q!|dd�=qdS)NT)r�rk�reversedrPra)r"r~rmrFrrrrX�s
 259  ��zGroupQueue.deqcCs.z|j|j�|�WdStyYdSwrW)r�rgrp�
 260  ValueErrorrYrrrrp	s
 261  �zGroupQueue.removeN)r'r(r)r rhrXrprrrrrN�s
 262  rNc@� eZdZdZdd�Zdd�ZdS)rz� Object such that ``p.pretty(RawText(value))`` is the same as ``p.text(value)``.
 263  
 264      An example usage of this would be to show a list as binary numbers, using
 265      ``p.pretty([RawText(bin(i)) for i in integers])``.
 266      cC�
 267  ||_dSrW��value�r"r�rrrr �
 268  zRawText.__init__cCs|�|j�dSrW)r_r�)r"�pr�rrrr�szRawText._repr_pretty_N�r'r(r)rtr r�rrrrrsrc@s,eZdZdZdd�Zedd��Zdd�ZdS)	rzY Object which emits a line-wrapped call expression in the form `__name(*args, **kwargs)` cOs|}||_||_||_dSrW)r�r#r$)Z_CallExpression__selfZ_CallExpression__namer#r$r"rrrr s
 269  zCallExpression.__init__c���fdd�}|S)Ncs��g|�Ri|��SrWr)r#r$�r�r�rr�inner)sz%CallExpression.factory.<locals>.innerr)r�r�r�rr�r�factory'szCallExpression.factoryc
 270  s�d���fdd�}|jd}��t|�|d��E|jD]
 271  }|���|�q|j��D](\}}|�|d}��t|�|��
 272  ��|�Wd�n1sNwYq+Wd�dS1s_wYdS)NFcs�r��d����d�dS)NriT)r_rdr�r��startedrr�new_item2s
 273  z.CallExpression._repr_pretty_.<locals>.new_item�(�)�=)r�rFr\r#r
 274  r$r/)r"r�r�r��prefix�argZarg_nameZ
 275  arg_prefixrr�rr�-s 
 276  
 277  ���"�zCallExpression._repr_pretty_N)r'r(r)rtr �classmethodr�r�rrrrrs
 278  rc@r�)rz/ Wrapper that shows a string with a `r` prefix cCr�rWr�r�rrrr Gr�zRawStringLiteral.__init__cCsNt|j�}|dd�dvr|dd�}d}nd}||�dd�}|�|�dS)NrfZuU�ur�rz\\�\)�reprr��replacer_)r"r�r�Z	base_reprr�rrrr�Js
 279  zRawStringLiteral._repr_pretty_Nr�rrrrrEsrc	Cs0t|dd�p	t|�}t|dd�tjurt|||�dS|�dd�|�|�|�dt|��|r7|�d�nY|j	r�d}t
 280  |�D]O}|�d	�s�zt||�}Wn	t
 281  yWYq@wt|tj�r_q@|sf|�d
 282  �|��|�|�|�d�t|�d}|j|7_|�|�|j|8_d}q@|�dd
 283  �dS)zw
 284      The default print function.  Used if an object does not provide one and
 285      it's none of the builtin objects.
 286      r&Nr�rf�<z at 0x%xz ...T�_rir�F�>)rrxryr�r�rBr
 287  r_r�r7�dir�
 288  startswithr�AttributeErrorrS�types�
 289  MethodTyperdr\r@rC)rr�r��klass�firstr+r��steprrrr�Us@
 290  
 291  �
 292  
 293  
 294  
 295  �r�cr�)z|
 296      Factory that returns a pprint function useful for sequences.  Used by
 297      the default pprint for tuples and lists.
 298      cs�|r|��d��St��}|�|��|�|�D]\}}|r)|�d�|��|�|�qt|�dkr?t|t�r?|�d�|�|��dS)Nrjrirf)	r_r\rBrnrdr
 299  rS�tuplerC)rr�r�r�rmrU��end�startrrr��s
 300  
 301  z$_seq_pprinter_factory.<locals>.innerr�r�r�r�rr�r�_seq_pprinter_factory{�r�cr�)zP
 302      Factory that returns a pprint function useful for sets and frozensets.
 303      cs�|r|��d��St|�dkr|�t|�jd�dSt��}|�|��|jr1t|�|jks6t|�}n|}|�|�D]\}}|rL|�d�|��|�	|�q=|�
 304  |��dS)Nrjrz()ri)r_r\rxr'rBr4r0rnrdr
 305  rC)rr�r�r�r/rmrUr�rrr��s
 306  
 307  z$_set_pprinter_factory.<locals>.innerrr�rr�r�_set_pprinter_factory�sr�cr�)zj
 308      Factory that returns a pprint function used by the default pprint of
 309      dicts and dict proxies.
 310      cs�|r|�d�St��}|�|��|��}|�|�D] \}}|r)|�d�|��|�|�|�d�|�||�q|�|��dS)Nz{...}riz: )r_r\rB�keysrnrdr
 311  rC)rr�r�r�r�rmr+r�rrr��s
 312  
 313  
 314  
 315  z%_dict_pprinter_factory.<locals>.innerrr�rr�r�_dict_pprinter_factory�r�r�cCsj|�dd�|�|j�|�d�|��tr'|jj}|�||ur#dn|�n|�|j�|�dd�dS)zThe pprint for the super type.�z<super: riNr�)	rBr
 316  �
 317  __thisclass__r_rdrr��__self__rC)rr�r�Zdselfrrr�
 318  _super_pprint�s
 319  r�c@r�)�_ReFlagscCr�rWr�r�rrrr �r�z_ReFlags.__init__cCsBd}dD]}|jtt|�@r|r|�d�|�d|�d}qdS)NF)�
 320  IGNORECASE�LOCALE�	MULTILINE�DOTALL�UNICODE�VERBOSE�DEBUG�|zre.T)r�r�rer_)r"r�r�Zdone_one�flagrrrr��s	
 321  ��z_ReFlags._repr_pretty_N)r'r(r)r r�rrrrr��sr�cCsHt�d�}|jr|�|t|j�t|j���dS|�|t|j���dS)z4The pprint function for regular expression patterns.z
 322  re.compileN)rr��flagsr
 323  r�patternr�)rr�r�Z
 324  re_compilerrr�_re_pattern_pprint�s
 325   r�cCs>t�d�}|r|�|td���dS|�|di|j���dS)z.The pprint function for types.SimpleNamespace.�	namespacerjNr)rr�r
 326  rr�)rr�r�r�rrr�_types_simplenamespace_pprint�s
 327  r�cCs�dd�tt|��D�dd�tgkrt|||�dSt|dd�}z|j}t|t�s-td��WntyA|j}t|t�s?d}Ynw|dvrM|�	|�dS|�	|d	|�dS)
 328  z!The pprint for classes and types.cSsg|]
 329  }dt|�vr|�qS)r�)�vars)�.0�mrrr�
 330  <listcomp>sz _type_pprint.<locals>.<listcomp>Nrfr(zTry __name__z<unknown type>)N�__builtin__�builtins�
 331  exceptions�.)
 332  r}rxr�rr)rSr.rr'r_)rr�r�r�r�rrr�_type_pprint�s$$
 333  �
 334  ��r�cCsft|�}|��}|���t|�D]\}}|r|��|�|�qWd�dS1s,wYdS)z9A pprint that just redirects to the normal repr function.N)r��
 335  splitlinesrFrkrer_)rr�r�rH�linesrmZoutput_linerrrr�s
 336  �"�r�cCsjt|d|j�}|j}|r|dvr|d|}z
 337  |tt|��}Wnty+|}Ynw|�d|�dS)z4Base pprint for all functions and builtin functions.r))r�r�r�r�z
 338  <function %s>N)rr'r(r.rr�r_)rr�r�r�r�Zfunc_defrrr�_function_pprint#s�r�cCsPt|jd|jj�}|jjdvrd|jj|f}|�t|gt|dd��R��dS)zBase pprint for all exceptions.r))r�r�z%s.%sr#rN)rr&r'r(r
 339  r)rr�r�r�rrr�_exception_pprint0s"r��_exception_baser�r��[�]�{�}zfrozenset({z})zenviron{zmappingproxy({r�cCs t�|d�}|dur|t|<|S)z0
 340      Add a pretty printer for a given type.
 341      N)r��get)�typ�func�oldfuncrrrrgsrcCs(||f}t�|d�}|dur|t|<|S)z|
 342      Add a pretty printer for a type specified by the module and name of a type
 343      rather than the type object itself.
 344      N)r�r�)Ztype_module�	type_namer�r+r�rrrrqs
 345  rTcCsBt�|jj�}|r|�|td���dS|�||jt|���dS�Nrj)rr�r&r'r
 346  r�default_factory�dict�rr�r�Zcls_ctorrrr�_defaultdict_pprint�sr�cC�Zt�|jj�}|r|�|td���dSt|�r%|�|t|�����dS|�|��dSr�)	rr�r&r'r
 347  rr\r,r/r�rrr�_ordereddict_pprint��rcCsdt�|jj�}|r|�|td���dS|jdur'|�|t|�|jd��dS|�|t|���dS)Nrj)�maxlen)rr�r&r'r
 348  rrr,r�rrr�
 349  _deque_pprint�s
 350  rcCr�r�)	rr�r&r'r
 351  rr\r��most_commonr�rrr�_counter_pprint�rrcCs<t�|jj�}|r|�|td���dS|�||j��dSr�)rr�r&r'r
 352  rrsr�rrr�_userlist_pprint�sr�collections�defaultdict�OrderedDictr�Counter�UserList�__main__)�	randrangec@r�)�FoocCs@d|_t�d�|_t�td�tdd��|_d|_	dd|g|_
 353  dS)Nrfz\s+��(gg�����@�blubZblah)�foor��compile�barr��fromkeys�ranger
 354  rZheher,r�rrrr �s
 355  zFoo.__init__cCstd�dS)Nr)�printr�rrr�get_foo�szFoo.get_fooN)r'r(r)r rrrrrr�sr)r7rW)ert�
 356  contextlibr�datetime�osr�r<r�rr�inspectr�ior�warningsrZIPython.utils.decoratorsrZIPython.utils.py3compatr�typingr	�__all__rurxrZ_re_pattern_typerrr0r
 357  rryr?rr}r
 358  r�rTrbrLrNrrrr�r�r�r�r�r�r�r�r�r�r�r��__annotations__�
 359  BaseExceptionr��	NameErrorr�int�floatr.r�r,r��set�	frozensetr�FunctionType�BuiltinFunctionTyper��SimpleNamespace�	timedeltar��environZ	_env_type�MappingProxyType�slicer�bytesr�rrr�mapr��Ellipsis�NotImplementedrr�rrrrr'�randomr
 360  rrrrr�<module>s�_
 361  
 362  h
 363  (&		
 364  
 365  ����
 366  �
 367  �
 368  �
 369  �
 370  �	�
 371  ���
 372  ������
 373  
 374  
 375  ��		
 376  
 377  �