Skip to content

Commit b3c223e

Browse files
committed
Small fixes
1 parent 845e899 commit b3c223e

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Dictionary
6969
```python
7070
<view> = <dict>.keys() # Coll. of keys that reflects changes.
7171
<view> = <dict>.values() # Coll. of values that reflects changes.
72-
<view> = <dict>.items() # Coll. of key-value tuples.
72+
<view> = <dict>.items() # Coll. of key-value tuples that reflects chgs.
7373
```
7474

7575
```python
@@ -246,8 +246,8 @@ Type
246246
* **Type and class are synonymous.**
247247

248248
```python
249-
<type> = type(<el>) # Or: <el>.__class__
250-
<bool> = isinstance(<el>, <type>) # Or: issubclass(type(<el>), <type>)
249+
<type> = type(<el>) # Or: <el>.__class__
250+
<bool> = isinstance(<el>, <type>) # Or: issubclass(type(<el>), <type>)
251251
```
252252

253253
```python
@@ -368,11 +368,11 @@ import re
368368

369369
### Match Object
370370
```python
371-
<str> = <Match>.group() # Whole match. Also group(0).
372-
<str> = <Match>.group(1) # Part in first bracket.
373-
<tuple> = <Match>.groups() # All bracketed parts.
374-
<int> = <Match>.start() # Start index of a match.
375-
<int> = <Match>.end() # Exclusive end index of a match.
371+
<str> = <Match>.group() # Returns whole match. Also group(0).
372+
<str> = <Match>.group(1) # Returns part in first bracket.
373+
<tuple> = <Match>.groups() # Returns all bracketed parts.
374+
<int> = <Match>.start() # Returns start index of a match.
375+
<int> = <Match>.end() # Returns exclusive end index of a match.
376376
```
377377

378378
### Special Sequences
@@ -474,8 +474,8 @@ Format
474474
### Ints
475475
```python
476476
{90:c} # 'Z'
477-
{90:X} # '5A'
478477
{90:b} # '1011010'
478+
{90:X} # '5A'
479479
```
480480

481481

index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
</code></pre>
259259
<div><h2 id="dictionary"><a href="#dictionary" name="dictionary">#</a>Dictionary</h2><pre><code class="python language-python hljs">&lt;view&gt; = &lt;dict&gt;.keys() <span class="hljs-comment"># Coll. of keys that reflects changes.</span>
260260
&lt;view&gt; = &lt;dict&gt;.values() <span class="hljs-comment"># Coll. of values that reflects changes.</span>
261-
&lt;view&gt; = &lt;dict&gt;.items() <span class="hljs-comment"># Coll. of key-value tuples.</span>
261+
&lt;view&gt; = &lt;dict&gt;.items() <span class="hljs-comment"># Coll. of key-value tuples that reflects chgs.</span>
262262
</code></pre></div>
263263

264264
<pre><code class="python language-python hljs">value = &lt;dict&gt;.get(key, default=<span class="hljs-keyword">None</span>) <span class="hljs-comment"># Returns default if key is missing.</span>
@@ -378,8 +378,8 @@
378378
<li><strong>Everything is an object.</strong></li>
379379
<li><strong>Every object has a type.</strong></li>
380380
<li><strong>Type and class are synonymous.</strong></li>
381-
</ul><pre><code class="python language-python hljs">&lt;type&gt; = type(&lt;el&gt;) <span class="hljs-comment"># Or: &lt;el&gt;.__class__</span>
382-
&lt;bool&gt; = isinstance(&lt;el&gt;, &lt;type&gt;) <span class="hljs-comment"># Or: issubclass(type(&lt;el&gt;), &lt;type&gt;)</span>
381+
</ul><pre><code class="python language-python hljs">&lt;type&gt; = type(&lt;el&gt;) <span class="hljs-comment"># Or: &lt;el&gt;.__class__</span>
382+
&lt;bool&gt; = isinstance(&lt;el&gt;, &lt;type&gt;) <span class="hljs-comment"># Or: issubclass(type(&lt;el&gt;), &lt;type&gt;)</span>
383383
</code></pre></div>
384384

385385

@@ -473,11 +473,11 @@
473473
<li><strong>Use <code class="python hljs"><span class="hljs-string">r'\1'</span></code> or <code class="python hljs"><span class="hljs-string">'\\1'</span></code> for backreference.</strong></li>
474474
<li><strong>Add <code class="python hljs"><span class="hljs-string">'?'</span></code> after an operator to make it non-greedy.</strong></li>
475475
</ul>
476-
<div><h3 id="matchobject">Match Object</h3><pre><code class="python language-python hljs">&lt;str&gt; = &lt;Match&gt;.group() <span class="hljs-comment"># Whole match. Also group(0).</span>
477-
&lt;str&gt; = &lt;Match&gt;.group(<span class="hljs-number">1</span>) <span class="hljs-comment"># Part in first bracket.</span>
478-
&lt;tuple&gt; = &lt;Match&gt;.groups() <span class="hljs-comment"># All bracketed parts.</span>
479-
&lt;int&gt; = &lt;Match&gt;.start() <span class="hljs-comment"># Start index of a match.</span>
480-
&lt;int&gt; = &lt;Match&gt;.end() <span class="hljs-comment"># Exclusive end index of a match.</span>
476+
<div><h3 id="matchobject">Match Object</h3><pre><code class="python language-python hljs">&lt;str&gt; = &lt;Match&gt;.group() <span class="hljs-comment"># Returns whole match. Also group(0).</span>
477+
&lt;str&gt; = &lt;Match&gt;.group(<span class="hljs-number">1</span>) <span class="hljs-comment"># Returns part in first bracket.</span>
478+
&lt;tuple&gt; = &lt;Match&gt;.groups() <span class="hljs-comment"># Returns all bracketed parts.</span>
479+
&lt;int&gt; = &lt;Match&gt;.start() <span class="hljs-comment"># Returns start index of a match.</span>
480+
&lt;int&gt; = &lt;Match&gt;.end() <span class="hljs-comment"># Returns exclusive end index of a match.</span>
481481
</code></pre></div>
482482

483483
<div><h3 id="specialsequences">Special Sequences</h3><ul>
@@ -558,8 +558,8 @@
558558
+---------------+-----------------+-----------------+-----------------+-----------------+
559559
</code></pre>
560560
<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'</span>
561-
{<span class="hljs-number">90</span>:X} <span class="hljs-comment"># '5A'</span>
562561
{<span class="hljs-number">90</span>:b} <span class="hljs-comment"># '1011010'</span>
562+
{<span class="hljs-number">90</span>:X} <span class="hljs-comment"># '5A'</span>
563563
</code></pre></div>
564564

565565
<div><h2 id="numbers"><a href="#numbers" name="numbers">#</a>Numbers</h2><div><h3 id="types">Types</h3><pre><code class="python language-python hljs">&lt;int&gt; = int(&lt;float/str/bool&gt;) <span class="hljs-comment"># Or: math.floor(&lt;float&gt;)</span>

0 commit comments

Comments
 (0)