fixed PY-9263 Move attribute to init method: add super class call when moving to not yet existing init

This commit is contained in:
Ekaterina Tuzova
2013-09-09 15:46:27 +04:00
parent bbec7ea98d
commit 92415cade1
5 changed files with 61 additions and 20 deletions

View File

@@ -0,0 +1,9 @@
__author__ = 'ktisha'
class Base:
def __init__(self):
self.param = 2
class Child(Base):
def f(self):
self.<caret>my = 2

View File

@@ -0,0 +1,13 @@
__author__ = 'ktisha'
class Base:
def __init__(self):
self.param = 2
class Child(Base):
def __init__(self):
Base.__init__(self)
self.my = 2
def f(self):
pass