From 67a16d744c097ec6a7bec2ecb6e21bf5dde4d269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 11 Jul 2019 17:49:25 +0200 Subject: [PATCH] Added slots --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a761c2c..dd4f4b8 100644 --- a/README.md +++ b/README.md @@ -1036,7 +1036,7 @@ class : ### Slots **Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.** -``` +```python class MyClassWithSlots: __slots__ = ['a'] def __init__(self): diff --git a/index.html b/index.html index 8ece0e5..c6db986 100644 --- a/index.html +++ b/index.html @@ -976,7 +976,7 @@ Z = dataclasses.make_dataclass('Z', [

Slots

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

-
class MyClassWithSlots:
+
class MyClassWithSlots:
     __slots__ = ['a']
     def __init__(self):
         self.a = 1