摘要:
字典和列表生成式 There are syntax constructions to ease the creation of a Dictionary or List based on existing iterable. 可以简化基于可迭代对象创建列表或字典的语法结构。 列表生成式List Co 阅读全文
posted @ 2017-08-24 14:53
Zoe233
阅读(213)
评论(0)
推荐(0)
摘要:
如何通过值或引用传递参数? Everything in Python is an object and all variables hold references to the objects. The references values are according to the functions 阅读全文
posted @ 2017-08-24 14:33
Zoe233
阅读(236)
评论(0)
推荐(0)
摘要:
列表和元组的区别 The difference between list and tuple is that list is mutable while tuple is not. Tuple can be hashed for as a key for dictionaries. list和tup 阅读全文
posted @ 2017-08-24 13:32
Zoe233
阅读(312)
评论(0)
推荐(0)
摘要:
一、前言 Python的修饰器的英文名叫Decorator,当你看到这个英文名的时候,你可能会把其跟Design Pattern里的Decorator搞混了,其实这是完全不同的两个东西。虽然好像,他们要干的事都很相似——都是想要对一个已有的模块做一些“修饰工作”,所谓修饰工作就是想给现有的模块加上一 阅读全文
posted @ 2017-08-24 13:15
Zoe233
阅读(153)
评论(0)
推荐(0)