0

Lets, say that I have a such a class:

class A:
    def __init__(self, x, y, z, ...):

I need a shortcut to add fields given in constructor definition to my model. So after clicking some fancy keys combinations I expect such result:

class A:
    def __init__(self, x, y, z, ...):
        self.x = x
        self.y = y
        self.z = z
        more fields...

What is the workaround to achieve expected result?

Przemek
  • 647
  • 2
  • 8
  • 25
  • 2
    @cᴏʟᴅsᴘᴇᴇᴅ, I doubt it is a duplicate. This question is not about how to design a class with long arg list in \_\_init__ method, but rather about how to make automagic in IDE or editor to generate the body of \_\_init__ method. – Pak Uula Dec 12 '17 at 09:33
  • @PakUula It may not be identical but I still think it applies, and results in more readable code anyway. – cs95 Dec 12 '17 at 09:36

0 Answers0