Skip to content

Commit 5dd0421

Browse files
committed
Small fixes
1 parent 986fd4a commit 5dd0421

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,8 +1283,8 @@ class MyAbcSequence(collections.abc.Sequence):
12831283
| count() | | | | yes |
12841284
+------------+----------+------------+----------+--------------+
12851285
```
1286-
1287-
* **Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping. Required methods: `'<abc>.__abstractmethods__'`.**
1286+
* **Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping.**
1287+
* **Names of their required methods are stored in `'<abc>.__abstractmethods__'`.**
12881288

12891289

12901290
Enum
@@ -2136,7 +2136,7 @@ class MyMetaClass(type):
21362136
* **New() can also be called directly, usually from a new() method of a child class (**`def __new__(cls): return super().__new__(cls)`**), in which case init() is not called.**
21372137

21382138
### Metaclass Attribute
2139-
**Right before a class is created it checks if it has metaclass attribute defined. If not, it recursively checks if any of his parents has it defined and eventually comes to type().**
2139+
**Right before a class is created it checks if it has a 'metaclass' attribute defined. If not, it recursively checks if any of his parents has it defined and eventually comes to type().**
21402140

21412141
```python
21422142
class MyClass(metaclass=MyMetaClass):

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,8 @@
12091209
</code></pre></div>
12101210

12111211
<ul>
1212-
<li><strong>Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping. Required methods: <code class="python hljs"><span class="hljs-string">'&lt;abc&gt;.__abstractmethods__'</span></code>.</strong></li>
1212+
<li><strong>Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping.</strong></li>
1213+
<li><strong>Names of their required methods are stored in <code class="python hljs"><span class="hljs-string">'&lt;abc&gt;.__abstractmethods__'</span></code>.</strong></li>
12131214
</ul>
12141215
<div><h2 id="enum"><a href="#enum" name="enum">#</a>Enum</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> enum <span class="hljs-keyword">import</span> Enum, auto
12151216

@@ -1860,7 +1861,7 @@
18601861
<li><strong>It receives the same arguments as init(), except for the first one that specifies the desired class of returned instance (MyMetaClass in our case).</strong></li>
18611862
<li><strong>New() can also be called directly, usually from a new() method of a child class (</strong><code class="python hljs"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__new__</span><span class="hljs-params">(cls)</span>:</span> <span class="hljs-keyword">return</span> super().__new__(cls)</code><strong>), in which case init() is not called.</strong></li>
18621863
</ul>
1863-
<div><h3 id="metaclassattribute">Metaclass Attribute</h3><p><strong>Right before a class is created it checks if it has metaclass attribute defined. If not, it recursively checks if any of his parents has it defined and eventually comes to type().</strong></p><pre><code class="python language-python hljs"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyClass</span><span class="hljs-params">(metaclass=MyMetaClass)</span>:</span>
1864+
<div><h3 id="metaclassattribute">Metaclass Attribute</h3><p><strong>Right before a class is created it checks if it has a 'metaclass' attribute defined. If not, it recursively checks if any of his parents has it defined and eventually comes to type().</strong></p><pre><code class="python language-python hljs"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyClass</span><span class="hljs-params">(metaclass=MyMetaClass)</span>:</span>
18641865
b = <span class="hljs-number">12345</span>
18651866
</code></pre></div>
18661867

web/index_tmp.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ Index
66
**all function, [11](#anyall)**
77
**animation, [39](#animation)**
88
**any function, [11](#anyall)**
9+
**argparse module, [22](#argparse)**
910
**arguments, [10](#arguments)**
1011
**arrays, [28](#array)**
1112
**audio, [39](#audio)-[40](#writefloatsamplestowavfile)**
1213

1314
### B
1415
**basic script template, [41](#basicscripttemplate)**
16+
**beautifulsoup4 library, [34](#scraping)**
1517
**binary representation, [8](#binhex)**
1618
**bitwise operators, [8](#bitwiseoperators)**
19+
**bottle library, [35](#web)**
1720
**bytes, [27](#bytes)-[28](#readbytesfromfile)**
1821

1922
### C
@@ -47,9 +50,11 @@ Index
4750
**exceptions, [20](#exceptions)-[21](#reraisingcaughtexception), [22](#exceptions-1)**
4851

4952
### F
53+
**files, [23](#file)**
5054
**filter function, [11](#mapfilterreduce)**
5155
**floats, [4](#abc), [6](#floats), [7](#types)**
5256
**format function, [6](#format)-[7](#comparisonoffloatpresentationtypes)**
57+
**futures, [30](#threadpool)**
5358

5459
### G
5560
**generator, [4](#generator)**
@@ -74,15 +79,18 @@ Index
7479
**lambda, [11](#lambda)**
7580
**list comprehension, [11](#comprehension)**
7681
**lists, [1](#list)-2**
82+
**locks, [29](#lock)**
7783
**logging, [34](#logging)**
7884
**lru_cache decorator, [13](#lrucache)**
7985

8086
### M
8187
**main function, [1](#main), [41](#basicscripttemplate)**
8288
**map function, [11](#mapfilterreduce)**
8389
**math module, [7](#math)**
90+
**matplotlib library, [33](#plot)**
8491
**memoryviews, [29](#memoryview)**
8592
**metaprograming, [31](#metaprograming)**
93+
**mysql library, [26](#mysql)**
8694

8795
### N
8896
**namedtuples, [3](#namedtuple)**
@@ -117,11 +125,12 @@ Index
117125
**requests library, [34](#scraping), [35](#test)**
118126

119127
### S
120-
**SQLite module, [26](#sqlite)**
128+
**sqlite3 module, [26](#sqlite)**
121129
**scraping, [34](#scraping)**
122130
**sequence, [18](#sequence), [19](#collectionsabcsequence)**
123131
**sets, [2](#set)**
124132
**shell commands, [24](#shellcommands)**
133+
**sleep function, [33](#progressbar)**
125134
**splat operator, [10](#splatoperator)-[11](#otheruses)**
126135
**statistics module, [7](#statistics)**
127136
**strings, [5](#string)**
@@ -130,8 +139,9 @@ Index
130139

131140
### T
132141
**table, [33](#table)**
133-
**threads, [29](#threading)-[30](#threadpool)**
134-
**time module, [35](#stopwatch)**
142+
**threading module, [29](#threading)-[30](#threadpool)**
143+
**time module, [33](#progressbar), [35](#stopwatch)**
144+
**tqdm library, [33](#progressbar)**
135145
**tuples, [3](#tuple)**
136146
**type, [4](#type), [31](#type-1)**
137147

0 commit comments

Comments
 (0)