2014年11月14日
摘要: python中的函数使用较简单,这里列出值得注意的几点: 内嵌函数 例如: # coding: utf-8 def foo(): def bar(): print 'bar() called.' print 'foo() called.' foo() bar() 对bar的调用是非法的,因为bar的作用域仅限于foo内,除非使用闭包将... 阅读全文
posted @ 2014-11-14 21:56 inevermore 阅读(250) 评论(0) 推荐(0) 编辑