Inheritance best practice : *args, **kwargs or explicitly specifying parameters

后端 未结 6 1636
长发绾君心
长发绾君心 2020-12-23 02:10

I often find myself overwriting methods of a parent class, and can never decide if I should explicitly list given parameters or just use a blanket *args, **kwargs

6条回答
  •  别那么骄傲
    2020-12-23 02:24

    I prefer explicit arguments because auto complete allows you to see the method signature of the function while making the function call.

提交回复
热议问题