Browse Source

Format

pull/97/merge
Jure Šorn 3 weeks ago
parent
commit
b87a82b76a
2 changed files with 6 additions and 6 deletions
  1. 4
      README.md
  2. 8
      index.html

4
README.md

@ -486,8 +486,8 @@ Format
### Ints
```python
{90:c} # 'Z'. Unicode character with value 90.
{90:b} # '1011010'. Number 90 in binary.
{90:X} # '5A'. Number 90 in uppercase hexadecimal.
{90:b} # '1011010'. Binary representation of the int.
{90:X} # '5A'. Hexadecimal with upper-case letters.
```

8
index.html

@ -56,7 +56,7 @@
<body>
<header>
<aside>March 27, 2025</aside>
<aside>March 29, 2025</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -451,8 +451,8 @@ Point(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>
<li><strong>This rule only effects numbers that can be represented exactly by a float (<code class="python hljs"><span class="hljs-number">.5</span></code>, <code class="python hljs"><span class="hljs-number">.25</span></code>, …).</strong></li>
</ul>
<div><h3 id="ints">Ints</h3><pre><code class="python language-python hljs">{<span class="hljs-number">90</span>:c} <span class="hljs-comment"># 'Z'. Unicode character with value 90.</span>
{<span class="hljs-number">90</span>:b} <span class="hljs-comment"># '1011010'. Number 90 in binary.</span>
{<span class="hljs-number">90</span>:X} <span class="hljs-comment"># '5A'. Number 90 in uppercase hexadecimal.</span>
{<span class="hljs-number">90</span>:b} <span class="hljs-comment"># '1011010'. Binary representation of the int.</span>
{<span class="hljs-number">90</span>:X} <span class="hljs-comment"># '5A'. Hexadecimal with upper-case letters.</span>
</code></pre></div>
<div><h2 id="numbers"><a href="#numbers" name="numbers">#</a>Numbers</h2><pre><code class="python language-python hljs">&lt;int&gt; = int(&lt;float/str/bool&gt;) <span class="hljs-comment"># Or: math.trunc(&lt;float&gt;)</span>
@ -2944,7 +2944,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active
<footer>
<aside>March 27, 2025</aside>
<aside>March 29, 2025</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

Loading…
Cancel
Save