From 2aa3f949c4205ccdc43dbf0400d884351c4126c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 3 Dec 2019 04:32:46 +0100 Subject: [PATCH] Dataclass --- index.html | 2 +- parse.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 04b5603..24af68b 100644 --- a/index.html +++ b/index.html @@ -1004,7 +1004,7 @@ Z = dataclasses.make_dataclass('Z', [

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_val>])
+<tuple> = ('<attr_name>', <type> [, <default_value>])

Slots

Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.

class MyClassWithSlots:
     __slots__ = ['a']
diff --git a/parse.js b/parse.js
index 7d4d9d0..04bb459 100755
--- a/parse.js
+++ b/parse.js
@@ -61,7 +61,7 @@ const DATACLASS =
   '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_val>])';
+  '<tuple> = (\'<attr_name>\', <type> [, <default_value>])';
 
 
 function main() {