coolair
V2EX  ›  问与答

请教下 FlaskForm 继承类的__init__书写方式

  •  
  •   coolair · May 7, 2018 · 1473 views
    This topic created in 3015 days ago, the information mentioned may be changed or developed.

    一直以来都是这样写

    Class MyForm(FlaskForm):
        ...
    
        def __init__(self, *args, **kwargs):
            super(MyForm, self).__init__(*args, **kwargs)
    

    今天发下 PyCharm 提示: old-style class contains call for super method

    新写法应该是怎样的?

    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2515 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:58 · PVG 23:58 · LAX 08:58 · JFK 11:58
    ♥ Do have faith in what you're doing.