@ -971,7 +971,7 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
< pre > < code class = "python language-python hljs" > < span class = "hljs-meta" > > > > < / span > C.mro()
[< < span class = "hljs-class" > < span class = "hljs-title" > class< / span > '< span class = "hljs-title" > C< / span > '> , < < span class = "hljs-title" > class< / span > '< span class = "hljs-title" > A< / span > '> , < < span class = "hljs-title" > class< / span > '< span class = "hljs-title" > B< / span > '> , < < span class = "hljs-title" > class< / span > '< span class = "hljs-title" > object< / span > '> ]
< / span > < / code > < / pre >
< div > < h3 id = "property" > Property< / h3 > < pre > < code class = "python language-python hljs" > < span class = "hljs-class" > < span class = "hljs-keyword" > class< / span > < span class = "hljs-title" > MyClass< / span > :< / span >
< div > < h3 id = "property" > Property< / h3 > < p > < strong > Pythonic way to implement getters and setters.< / strong > < / p > < p re> < code class = "python language-python hljs" > < span class = "hljs-class" > < span class = "hljs-keyword" > class< / span > < span class = "hljs-title" > MyClass< / span > :< / span >
< span class = "hljs-meta" > @property< / span >
< span class = "hljs-function" > < span class = "hljs-keyword" > def< / span > < span class = "hljs-title" > a< / span > < span class = "hljs-params" > (self)< / span > :< / span >
< span class = "hljs-keyword" > return< / span > self._a
@ -981,6 +981,7 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
self._a = value
< / code > < / pre > < / div >
< pre > < code class = "python language-python hljs" > < span class = "hljs-meta" > > > > < / span > el = MyClass()
< span class = "hljs-meta" > > > > < / span > el.a = < span class = "hljs-number" > 123< / span >
< span class = "hljs-meta" > > > > < / span > el.a