摘要:
因为python没有switch语句,一直以来都是用多个if..elif..来实现相同逻辑.今天看到一个凶残暴力的实现方式,于是动手写写,记下来from distutils import logdef stateA(): log.warn('stateA called')def stateB(): log.warn('stateB called')def stateC(): log.warn('stateC called')def stateDefault(): log.warn('stateDefault called')cas 阅读全文
posted @ 2013-10-29 21:51
_漏斗
阅读(519)
评论(0)
推荐(0)

浙公网安备 33010602011771号