mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 09:04:15 +07:00
GitOrigin-RevId: 56876a5dd073a06c3fcc92f63ed1f5674830bc25
21 lines
422 B
HTML
21 lines
422 B
HTML
<html>
|
|
<body>
|
|
<p>Reports cases when a protected member is accessed outside the class,
|
|
a descendant of the class where it is defined, or a module.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Foo:
|
|
def _protected_method(self):
|
|
pass
|
|
|
|
|
|
class Bar(Foo):
|
|
def public_method(self):
|
|
self._protected_method()
|
|
|
|
|
|
foo = Foo()
|
|
foo._protected_method() # Access to a protected method
|
|
</code></pre>
|
|
</body>
|
|
</html> |