File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1036,7 +1036,7 @@ class <class_name>:
1036
1036
### Slots
1037
1037
** Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.**
1038
1038
1039
- ```
1039
+ ``` python
1040
1040
class MyClassWithSlots :
1041
1041
__slots__ = [' a' ]
1042
1042
def __init__ (self ):
Original file line number Diff line number Diff line change @@ -976,7 +976,7 @@ <h3 id="dataclass">Dataclass</h3>
976
976
</ ul >
977
977
< h3 id ="slots "> Slots</ h3 >
978
978
< p > < strong > Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.</ strong > </ p >
979
- < pre > < code class ="python hljs "> < span class ="hljs-class "> < span class ="hljs-keyword "> class</ span > < span class ="hljs-title "> MyClassWithSlots</ span > :</ span >
979
+ < pre > < code class ="python language-python hljs "> < span class ="hljs-class "> < span class ="hljs-keyword "> class</ span > < span class ="hljs-title "> MyClassWithSlots</ span > :</ span >
980
980
__slots__ = [< span class ="hljs-string "> 'a'</ span > ]
981
981
< span class ="hljs-function "> < span class ="hljs-keyword "> def</ span > < span class ="hljs-title "> __init__</ span > < span class ="hljs-params "> (self)</ span > :</ span >
982
982
self.a = < span class ="hljs-number "> 1</ span >
You can’t perform that action at this time.
0 commit comments