From 5dd0421730fd99cc47262b878e240c5abce7796c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 24 Sep 2019 14:37:14 +0200 Subject: [PATCH] Small fixes --- README.md | 6 +++--- index.html | 5 +++-- web/index_tmp.txt | 16 +++++++++++++--- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 50a345b..199172d 100644 --- a/README.md +++ b/README.md @@ -1283,8 +1283,8 @@ class MyAbcSequence(collections.abc.Sequence): | count() | | | | yes | +------------+----------+------------+----------+--------------+ ``` - -* **Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping. Required methods: `'.__abstractmethods__'`.** +* **Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping.** +* **Names of their required methods are stored in `'.__abstractmethods__'`.** Enum @@ -2136,7 +2136,7 @@ class MyMetaClass(type): * **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.** ### Metaclass Attribute -**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().** +**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().** ```python class MyClass(metaclass=MyMetaClass): diff --git a/index.html b/index.html index 6e7a246..830df9e 100644 --- a/index.html +++ b/index.html @@ -1209,7 +1209,8 @@ lock = threading.RLock(); with lock: ...
    -
  • Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping. Required methods: '<abc>.__abstractmethods__'.
  • +
  • Other ABCs that generate missing methods are: MutableSequence, Set, MutableSet, Mapping and MutableMapping.
  • +
  • Names of their required methods are stored in '<abc>.__abstractmethods__'.

#Enum

from enum import Enum, auto
 
@@ -1860,7 +1861,7 @@ param_names  = list(<sig>.parameters.keys())
 
  • It receives the same arguments as init(), except for the first one that specifies the desired class of returned instance (MyMetaClass in our case).
  • 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.
  • -

    Metaclass Attribute

    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().

    class MyClass(metaclass=MyMetaClass):
    +

    Metaclass Attribute

    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().

    class MyClass(metaclass=MyMetaClass):
         b = 12345
     
    diff --git a/web/index_tmp.txt b/web/index_tmp.txt index 27a2754..29cb472 100644 --- a/web/index_tmp.txt +++ b/web/index_tmp.txt @@ -6,14 +6,17 @@ Index **all function, [11](#anyall)** **animation, [39](#animation)** **any function, [11](#anyall)** +**argparse module, [22](#argparse)** **arguments, [10](#arguments)** **arrays, [28](#array)** **audio, [39](#audio)-[40](#writefloatsamplestowavfile)** ### B **basic script template, [41](#basicscripttemplate)** +**beautifulsoup4 library, [34](#scraping)** **binary representation, [8](#binhex)** **bitwise operators, [8](#bitwiseoperators)** +**bottle library, [35](#web)** **bytes, [27](#bytes)-[28](#readbytesfromfile)** ### C @@ -47,9 +50,11 @@ Index **exceptions, [20](#exceptions)-[21](#reraisingcaughtexception), [22](#exceptions-1)** ### F +**files, [23](#file)** **filter function, [11](#mapfilterreduce)** **floats, [4](#abc), [6](#floats), [7](#types)** **format function, [6](#format)-[7](#comparisonoffloatpresentationtypes)** +**futures, [30](#threadpool)** ### G **generator, [4](#generator)** @@ -74,6 +79,7 @@ Index **lambda, [11](#lambda)** **list comprehension, [11](#comprehension)** **lists, [1](#list)-2** +**locks, [29](#lock)** **logging, [34](#logging)** **lru_cache decorator, [13](#lrucache)** @@ -81,8 +87,10 @@ Index **main function, [1](#main), [41](#basicscripttemplate)** **map function, [11](#mapfilterreduce)** **math module, [7](#math)** +**matplotlib library, [33](#plot)** **memoryviews, [29](#memoryview)** **metaprograming, [31](#metaprograming)** +**mysql library, [26](#mysql)** ### N **namedtuples, [3](#namedtuple)** @@ -117,11 +125,12 @@ Index **requests library, [34](#scraping), [35](#test)** ### S -**SQLite module, [26](#sqlite)** +**sqlite3 module, [26](#sqlite)** **scraping, [34](#scraping)** **sequence, [18](#sequence), [19](#collectionsabcsequence)** **sets, [2](#set)** **shell commands, [24](#shellcommands)** +**sleep function, [33](#progressbar)** **splat operator, [10](#splatoperator)-[11](#otheruses)** **statistics module, [7](#statistics)** **strings, [5](#string)** @@ -130,8 +139,9 @@ Index ### T **table, [33](#table)** -**threads, [29](#threading)-[30](#threadpool)** -**time module, [35](#stopwatch)** +**threading module, [29](#threading)-[30](#threadpool)** +**time module, [33](#progressbar), [35](#stopwatch)** +**tqdm library, [33](#progressbar)** **tuples, [3](#tuple)** **type, [4](#type), [31](#type-1)**