Browse Source

Format

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

3
README.md

@ -408,9 +408,6 @@ Format
{<el>:<10} # '<el> '
{<el>:^10} # ' <el> '
{<el>:>10} # ' <el>'
```
```python
{<el>:.<10} # '<el>......'
{<el>:<0} # '<el>'
```

5
index.html

@ -505,11 +505,10 @@ to_exclusive = &lt;range&gt;.stop
<div><h3 id="generaloptions">General Options</h3><pre><code class="python language-python hljs">{&lt;el&gt;:&lt;<span class="hljs-number">10</span>} <span class="hljs-comment"># '&lt;el&gt; '</span>
{&lt;el&gt;:^<span class="hljs-number">10</span>} <span class="hljs-comment"># ' &lt;el&gt; '</span>
{&lt;el&gt;:&gt;<span class="hljs-number">10</span>} <span class="hljs-comment"># ' &lt;el&gt;'</span>
{&lt;el&gt;:.&lt;<span class="hljs-number">10</span>} <span class="hljs-comment"># '&lt;el&gt;......'</span>
{&lt;el&gt;:&lt;<span class="hljs-number">0</span>} <span class="hljs-comment"># '&lt;el&gt;'</span>
</code></pre></div>
<pre><code class="python language-python hljs">{&lt;el&gt;:.&lt;<span class="hljs-number">10</span>} <span class="hljs-comment"># '&lt;el&gt;......'</span>
{&lt;el&gt;:&lt;<span class="hljs-number">0</span>} <span class="hljs-comment"># '&lt;el&gt;'</span>
</code></pre>
<div><h3 id="strings">Strings</h3><p><strong><code class="python hljs"><span class="hljs-string">'!r'</span></code> calls object's <a href="#class">repr()</a> method, instead of <a href="#class">str()</a>, to get a string.</strong></p><pre><code class="python language-python hljs">{<span class="hljs-string">'abcde'</span>!r:<span class="hljs-number">10</span>} <span class="hljs-comment"># "'abcde' "</span>
{<span class="hljs-string">'abcde'</span>:<span class="hljs-number">10.3</span>} <span class="hljs-comment"># 'abc '</span>
{<span class="hljs-string">'abcde'</span>:<span class="hljs-number">.3</span>} <span class="hljs-comment"># 'abc'</span>

Loading…
Cancel
Save