How to disallow any input value outside a given set using typing module

后端 未结 0 666
我寻月下人不归
我寻月下人不归 2021-01-12 08:19

I would like to do something similar to this:


    def split(self, sep: typing.Set(-1, 0, 1) = 1):

Anything beside those values should throw

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