阅读背景:

使用assert来验证python中有关参数的假设是不好的做法吗?

来源:互联网 

I am writing a class whose __init__ uses either an id OR a slug argument but not both. I'd like to verify that the arguments are as expected. Is it proper, and good-practice to use an uses either




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: