diff --git a/README.md b/README.md index dc92bae..d30dfbe 100644 --- a/README.md +++ b/README.md @@ -3515,4 +3515,3 @@ Index ----- * **Only available in [PDF](https://transactions.sendowl.com/products/78175486/4422834F/view).** * **Ctrl+F / ⌘F is usually sufficient.** -* **Searching `'#
'<attr_name>: list = []'
would make a list that is shared among all instances.
from dataclasses import make_dataclass
+Inline:
from dataclasses import make_dataclass
<class> = make_dataclass('<class_name>', <coll_of_attribute_names>)
<class> = make_dataclass('<class_name>', <coll_of_tuples>)
-<tuple> = ('<attr_name>', <type> [, <default_value>])
+<tuple> = ('<attr_name>', <type> [, <default_value>])
Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.
class MyClassWithSlots:
__slots__ = ['a']
@@ -1905,7 +1905,7 @@ param_names = list(<sig>.parameters.keys())
param_kinds = [a.kind for a in <sig>.parameters.values()]
Code that generates code.
Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.
<class> = type('<class_name>', <parents_tuple>, <attributes_dict>)
Code that generates code.
Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.
<class> = type('<class_name>', <parents_tuple>, <attributes_dict>)
cdef enum <enum_name>: <member_name_1>, <member_name_2>, ...
-$ pip3 install pyinstaller
+PyInstaller
$ pip3 install pyinstaller
$ pyinstaller script.py # Compiles into './dist/script' directory.
$ pyinstaller script.py --onefile # Compiles into './dist/script' console app.
$ pyinstaller script.py --windowed # Compiles into './dist/script' windowed app.
$ pyinstaller script.py --add-data '<path>:.' # Adds file to the root of the executable.
-
+
'os.path.join(sys._MEIPASS, <path>)'
.'#<title>'
will limit the search to the titles.<class> = type(\'<class_name>\', <parents_tuple>, <attributes_dict>)
';
+ '<class> = type(\'<class_name>\', <parents_tuple>, <attributes_dict>)';
const DATACLASS =
- 'from dataclasses import make_dataclass\n' +
+ 'from dataclasses import make_dataclass\n' +
'<class> = make_dataclass(\'<class_name>\', <coll_of_attribute_names>)\n' +
'<class> = make_dataclass(\'<class_name>\', <coll_of_tuples>)\n' +
- '<tuple> = (\'<attr_name>\', <type> [, <default_value>])
';
-
-const DATETIME =
- '\'<DT> = resolve_imaginary(<DT>)\'
';
+ '<tuple> = (\'<attr_name>\', <type> [, <default_value>])';
const PYINSTALLER =
- '$ pip3 install pyinstaller\n' +
+ '$ pip3 install pyinstaller\n' +
'$ pyinstaller script.py # Compiles into \'./dist/script\' directory.\n' +
'$ pyinstaller script.py --onefile # Compiles into \'./dist/script\' console app.\n' +
'$ pyinstaller script.py --windowed # Compiles into \'./dist/script\' windowed app.\n' +
- '$ pyinstaller script.py --add-data \'<path>:.\' # Adds file to the root of the executable.\n' +
- '
'
+ '$ pyinstaller script.py --add-data \'<path>:.\' # Adds file to the root of the executable.\n';
+
+const INDEX =
+ '\'#<title>\'
will limit the search to the titles.