Effective--实效Python编程

TableOfContents

Include(CPUGnav)

1. Effective Py Pregramming

1.1. 试译

Include(/EffectivePyEn)

1.2. 体验

   1 callDict = { 
   2     'FOZZIE': showFozzie,
   3     'KERMIT': showKermit,
   4     }
   5 # 然后就可以如此影响各种情况了
   6 func = callDict.get("FOZZIE", showUnknownMuppet)
   7 func()
   8 # 简化版本的..
   9 callDict.get("SomeMatterTarget", 
  10     showUnknownMuppet)()
  11 
  12 def showFozzie():
  13     print "showFozzie"
  14 def showKermit():
  15     print "showKermit"
  16 def showUnknownMuppet():
  17     print "showUnknownMuppet"

2. 反馈

::-- ZoomQuiet [DateTime(2007-02-02T02:31:04Z)]