diff --git a/README.md b/README.md index 46e8d38..cb03be1 100644 --- a/README.md +++ b/README.md @@ -1027,9 +1027,9 @@ class MyClass: ``` ```python ->>> el = MyClass() ->>> el.a = 123 ->>> el.a +>>> obj = MyClass() +>>> obj.a = 123 +>>> obj.a 123 ``` diff --git a/index.html b/index.html index b59357b..fe008bf 100644 --- a/index.html +++ b/index.html @@ -1022,9 +1022,9 @@ Z = dataclasses.make_dataclass('Z', [ -
>>> el = MyClass()
->>> el.a = 123
->>> el.a
+
>>> obj = MyClass()
+>>> obj.a = 123
+>>> obj.a
 123
 

Dataclass

Decorator that automatically generates init(), repr() and eq() special methods.

from dataclasses import dataclass, field