How to create object with optional attribute

前端 未结 0 647
天涯浪人
天涯浪人 2020-12-15 02:08

I have a class with an optional attribute. When I try instantiating the class without specifying the optional attribute, I get an error TypeError: __init__() missing 1

相关标签:
回答
  • 消灭零回复
提交回复
热议问题