From e21ef70fbcc13303052fd69015f56fbc1c323b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 12 Apr 2023 15:55:55 +0200 Subject: [PATCH] Class, Appendix --- README.md | 10 +++++----- index.html | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e55e0f2..94f2b3f 100644 --- a/README.md +++ b/README.md @@ -1049,9 +1049,9 @@ from dataclasses import dataclass, field @dataclass(order=False, frozen=False) class : - : - : = - : list/dict/set = field(default_factory=list/dict/set) + : + : = + : list/dict/set = field(default_factory=list/dict/set) ``` * **Objects can be made [sortable](#sortable) with `'order=True'` and immutable with `'frozen=True'`.** * **For object to be [hashable](#hashable), all attributes must be hashable and 'frozen' must be True.** @@ -3530,7 +3530,7 @@ import ```python cdef = -cdef [n_elements] = [, , ...] +cdef [n_elements] = [, , ...] cdef ( ): ... ``` @@ -3542,7 +3542,7 @@ cdef class : ``` ```python -cdef enum : , , ... +cdef enum : , , ... ``` ### PyInstaller diff --git a/index.html b/index.html index 79b1899..69c86d4 100644 --- a/index.html +++ b/index.html @@ -886,9 +886,9 @@ Z = dataclasses.make_dataclass('Z', [@dataclass(order=False, frozen=False) class <class_name>: - <attr_name_1>: <type> - <attr_name_2>: <type> = <default_value> - <attr_name_3>: list/dict/set = field(default_factory=list/dict/set) + <attr_name>: <type> + <attr_name>: <type> = <default_value> + <attr_name>: list/dict/set = field(default_factory=list/dict/set) @@ -2877,7 +2877,7 @@ print(f'Hello {values[All 'cdef' definitions are optional, but they contribute to the speed-up.
  • Script needs to be saved with a 'pyx' extension.
  • cdef <ctype> <var_name> = <el>
    -cdef <ctype>[n_elements] <var_name> = [<el_1>, <el_2>, ...]
    +cdef <ctype>[n_elements] <var_name> = [<el>, <el>, ...]
     cdef <ctype/void> <func_name>(<ctype> <arg_name>): ...
     
    @@ -2887,7 +2887,7 @@ cdef <ctype/void> <func_name>(<ctype> <arg_name>): ... def __init__(self, <ctype> <arg_name>): self.<attr_name> = <arg_name> -
    cdef enum <enum_name>: <member_name_1>, <member_name_2>, ...
    +
    cdef enum <enum_name>: <member_name>, <member_name>, ...
     

    PyInstaller

    $ pip3 install pyinstaller
     $ pyinstaller script.py                        # Compiles into './dist/script' directory.