Browse Source

Print

pull/44/head
Jure Šorn 5 years ago
parent
commit
f46ab8fab1
2 changed files with 6 additions and 2 deletions
  1. 3
      README.md
  2. 5
      index.html

3
README.md

@ -1444,8 +1444,9 @@ print(<el_1>, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
### Pretty Print
```python
from pprint import pprint
pprint(<collection>, stream=None, width=80)
pprint(<collection>, width=80, depth=None)
```
* **Levels deeper than 'depth' will be replaced by '...'.**
Input

5
index.html

@ -1339,9 +1339,12 @@ LogicOp = Enum(<span class="hljs-string">'LogicOp'</span>, {<span class="hljs-st
<li><strong>Use <code class="python hljs"><span class="hljs-string">'flush=True'</span></code> to forcibly flush the stream.</strong></li>
</ul>
<div><h3 id="prettyprint">Pretty Print</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> pprint <span class="hljs-keyword">import</span> pprint
pprint(&lt;collection&gt;, stream=<span class="hljs-keyword">None</span>, width=<span class="hljs-number">80</span>)
pprint(&lt;collection&gt;, width=<span class="hljs-number">80</span>, depth=<span class="hljs-keyword">None</span>)
</code></pre></div>
<ul>
<li><strong>Levels deeper than 'depth' will be replaced by '…'.</strong></li>
</ul>
<div><h2 id="input"><a href="#input" name="input">#</a>Input</h2><ul>
<li><strong>Reads a line from user input or pipe if present.</strong></li>
<li><strong>Trailing newline gets stripped.</strong></li>

|||||||
100:0
Loading…
Cancel
Save