Ise there a way to use super style for the __init__function in the inherit

class Apple(Product):
    def __init__(self,name,description):
        Product.__init__(self,name,description)
---->
it automatic use this below style  ?

class Apple(Product):
    def __init__(self,name,description):
        super(Apple,self).__init__(name,description)
2 comments
Comment actions Permalink
No, PyCharm always uses the second form (i.e. the version for new style classes; see here as well). AFAIK there is no way to configure this.
0
Comment actions Permalink
Hi Dirk

I remind it automatic uses "super" sometimes for me, but I forget how it do this

Lei
0

Please sign in to leave a comment.