Differences between revisions 3 and 6 (spanning 3 versions)
Revision 3 as of 2007-08-24 07:43:12
Size: 1733
Editor: ZoomQuiet
Comment:
Revision 6 as of 2007-09-01 06:23:16
Size: 2437
Editor: ZoomQuiet
Comment:
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
  * attachment:py-names-robertchen.pdf

{{{#!python
#decorator.py
def check_privilege(func):

 def checked_func(*args):

  self = args[0]

  if self.allow_show:

   func(*args)

  else:

   print 'showing is closed'

 return checked_func

 

class A(object):

 def __init__(self):

  self.allow_show = False

  

 @check_privilege

 def show(self, arg):

  print arg

  

 def enable_show(self):

  self.allow_show = True

  

 def disable_show(self):

  self.allow_show = False

a = A()

a.enable_show()

a.show("python")

a.disable_show()

a.show("python")
}}}
Line 29: Line 87:
  * '''[http://docs.google.com/Doc?id=ah9sz7kfxfhz_1xvw9gc 校对体验小结]'''

啄木鸟/CPUG会课 2007 第五次

-- ZoomQuiet [DateTime(2007-08-24T07:32:35Z)] TableOfContents

CPyUG总第21次.会课理想

时间: 2007-09-01 14:30--17:00
地址: 北京海淀区北四环西路58号,理想国际大厦 
      新浪北京 20层一号会议室
      (海淀图书城东100米;中关村海龙商厦西200米;
       北京大学南门以南四环南侧)

公交路线

  • 如果你不知道怎么走,[wiki:MapSinaBus 请看路线图]

主题分享

预订主题:

  1. BillXu -- [http://www.zeuux.org/fashion/ Python T裇 现场发售!+ zeuux.org 项目介绍]争取将自由宝贝也现场首发一下

  2. RobertChen -- Python 源代码鉴赏系列 之 名字、作用域与名字空间

    • attachment:py-names-robertchen.pdf

   1 #decorator.py
   2 def check_privilege(func):
   3 
   4         def checked_func(*args):
   5 
   6                 self = args[0]
   7 
   8                 if self.allow_show:
   9 
  10                         func(*args)
  11 
  12                 else:
  13 
  14                         print 'showing is closed'
  15 
  16         return checked_func
  17 
  18         
  19 
  20 class A(object):
  21 
  22         def __init__(self):
  23 
  24                 self.allow_show = False
  25 
  26                 
  27 
  28         @check_privilege
  29 
  30         def show(self, arg):
  31 
  32                 print arg
  33 
  34                 
  35 
  36         def enable_show(self):
  37 
  38                 self.allow_show = True
  39 
  40                 
  41 
  42         def disable_show(self):
  43 
  44                 self.allow_show = False
  45 
  46 a = A()
  47 
  48 a.enable_show()
  49 
  50 a.show("python")
  51 
  52 a.disable_show()
  53 
  54 a.show("python")
  1. AlexDong -- [http://www.haokanbu.com/event/5/ 好看薄] 项目经验分享

  2. XiaQ -- DIP5.4b 深入校对体验
  3. ZoomQuiet - 会课组织改进自由讨论

相关资料

列出希望大家先看一看的资料


建议使用S5 来组织幻灯资料,以便发布哪--[:S5:模板下载]

预定参加者

Include(CPUGer-070901)

会课角色

在线转播

Include(WoodpeckerLiving)

语音下载

我们的会课尽力有录音文档作归档

会课照片

会课回响

T裇紧急预订

本次会课有现场T裇发售活动,大家有想要的,预先在此留言说明,以便调配货源呢! PageComment2

BPUG/2007-09-01 (last edited 2009-12-25 07:14:23 by localhost)