mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
27 lines
533 B
HTML
27 lines
533 B
HTML
<html>
|
|
<body>
|
|
Reports a problem when instance attribute
|
|
definition is outside <code>__init__</code> method.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Book:
|
|
def __init__(self):
|
|
self.author = 'Mark Twain'
|
|
|
|
def release(self):
|
|
self.year = '1889'
|
|
</code></pre>
|
|
<p>
|
|
When the quick-fix is applied, the code sample changes to:
|
|
</p>
|
|
<pre><code>
|
|
class Book:
|
|
def __init__(self):
|
|
self.year = '1889'
|
|
self.author = 'Mark Twain'
|
|
|
|
def release(self):
|
|
pass
|
|
</code></pre>
|
|
</body>
|
|
</html> |