title: PyCharm - generate fields for all constructor parameters
body: <p>I define a class with constructor:</p>
  
  <pre><code>class Example:
      def __init__(self, a, b, c):
          ...
  </code></pre>
  
  <p>Now I want to declare a field for each constructor parameter, like this:</p>
  
  <pre><code>class Example:
      def __init__(self, a, b, c):
          self.a = a
          self.b = b
          self.c = c
  </code></pre>
  
  <p>I want to do this automatically. PyCharm's inspection allows me to generate fields for the parameters, but only one at a time (as a fix for <code>Parameter x is not used</code>), which is very annoying. How can I do this, for all parameters, simultaneously?</p>
  
  <p>The closest thing I found is <a href="https://stackoverflow.com/questions/40114251/pycharm-template-for-python-class-init-function">PyCharm template for python class __init__ function</a>, and the solution is not flexible, since it supports only fixed number of parameters. Moreover, I feel like this is the feature which must be implemented in mature IDE, and Idea allows one to do this.</p>
  
  <p>That post also references <a href="https://stackoverflow.com/questions/3652851/what-is-the-best-way-to-do-automatic-attribute-assignment-in-python-and-is-it-a">What is the best way to do automatic attribute assignment in Python, and is it a good idea?</a>, which discusses <code>autoassign</code>, which seem to have lots of drawbacks.</p>
  
  <p>My PyCharm version is 2019.1.3 CE.</p>