技术宅,fat-man

增加语言的了解程度可以避免写出愚蠢的代码

导航

2014年1月2日 #

通过调试的重构代码(设计是对的,但是实现过程却有诸多的问题)

摘要: #!/usr/bin/env pythonclass Processor: def __init__(self, processor): self.processor = processor def isAllowSend(self, message, setChargeFlag): passclass WhildListProcessor(Processor): def isAllowSend(self, message, setChargeFlag): print "WhildListProcessor.isAll... 阅读全文

posted @ 2014-01-02 16:32 codestyle 阅读(545) 评论(0) 推荐(0)

针对上一篇文章中的代码,想出的重构方案(python实现)

摘要: #!/usr/bin/env pythonclass Processor: def __init__(self, processor): self.processor = processor def isAllowSend(self, message, setChargeFlag): passclass WhildListProcessor(Processor): def isAllowSend(self, message, setChargeFlag): if message.sender in (1,2): ... 阅读全文

posted @ 2014-01-02 13:09 codestyle 阅读(1166) 评论(0) 推荐(0)