python decorator base on probability

前端 未结 0 1648
渐次进展
渐次进展 2020-12-13 00:02

I am trying to write a decorator accepting a probability as an argument with the syntax:

@random(0.5) def func1():

so the probability indicates how likely is t

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