coolair
V2EX  ›  问与答

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

  •  
  •   coolair · May 7, 2018 · 1415 views
    This topic created in 2988 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   ·   5390 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 08:10 · PVG 16:10 · LAX 01:10 · JFK 04:10
    ♥ Do have faith in what you're doing.