页游开发中的Python组件与模式-.ppt

页游开发中的Python组件与模式-.ppt

页游开发中的 Python 组件与模式 赖勇浩() 2012-10-21 去年我来过…… 回顾…… 幻灯:/laiyonghao/python-webgame 录像(上海45分钟版):/v_3df867_14 录像(广州91分钟版):/v_playlist/1p4.html 偏向于“最佳实践”的经验分享 今天不一样…… 直奔主题! class Player(object): def signin(self, usr, pwd): ... self._signin = True def do_sth(self): if not self._signin: self.client.need_signin() return ... 有什么问题? def do_sth_1(... def do_sth_2(... def do_sth_3(... def do_sth_4(... … 一般这样解决掉…… @ensure_signin def do_sth(self, *a, **kw): … Decorator !!! 还有什么问题? def do_sth_1(... def do_sth_2(... def do_sth_3(... def do_sth_4(... … if not self._s

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档