initialize python module attribute when accessed the first time and ensure atomicity

前端 未结 0 762
一向
一向 2020-12-16 15:35

is there a way I can delay the initialization of module attribute to when it\'s first accessed? Also how can I ensure there\'s only one copy of the instance got created? I u

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