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