Pythonのdataclassでデータ構造のみを保存するクラスを用意

単にデータ(特に数値)を放り込む塊を作りたい場合、dataclassが使えます。 実際のところ from dataclasses import dataclass @dataclass class Point: x: int y: int = 10 pt = Point(x=10,y=19) pt.x #> 10 pt.y #> 19 初期値設定のおかげで pt3 = Point(x=10) pt3.x #> 10 pt3.y #> 0 pt4 = Point(80) pt4.x #> 80 pt4…