coolair
V2EX  ›  问与答

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

  •  
  •   coolair · May 7, 2018 · 1513 views
    This topic created in 3034 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   ·   3530 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 00:03 · PVG 08:03 · LAX 17:03 · JFK 20:03
    ♥ Do have faith in what you're doing.