Sign in
◑
Theme
android
/
platform
/
tools
/
idea
/
studio-master-dev
/
.
/
python
/
testData
/
inspections
/
PyDunderSlotsInspection
/
inheritedClassAttrAssignmentAndOwnAndInheritedWithAttrSlotsPy2.py
blob: 36f56fa84033afac232e071225127e4d7ff59ebb [
file
]
class
B
(
object
):
attr
=
'baz'
__slots__
=
[
'attr'
,
'b'
]
class
C
(
B
):
__slots__
=
[
'foo'
,
'bar'
]
C
.
attr
=
'spam'
print
(
C
.
attr
)
c
=
C
()
<
warning descr
=
"'C' object attribute 'attr' is read-only"
>
c
.
attr
</
warning
>
=
'spam'
print
(
c
.
attr
)