mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-22 00:24:37 +00:00
23 lines
361 B
Python
23 lines
361 B
Python
|
"""Accessing a protected method through super() is ok."""
|
||
|
|
||
|
# pylint: disable=missing-docstring,too-few-public-methods
|
||
|
|
||
|
__revision__ = None
|
||
|
|
||
|
class Alpha(object):
|
||
|
|
||
|
_secret = 2
|
||
|
|
||
|
def test(self):
|
||
|
print "test %s" % self
|
||
|
|
||
|
|
||
|
class Beta(Alpha):
|
||
|
|
||
|
def test(self):
|
||
|
print super(Beta, self)._secret
|
||
|
super(Beta, self).test()
|
||
|
|
||
|
|
||
|
Beta().test()
|