摘要:
python-functools functools-partial import functoolsprint(dir(func... 阅读全文
posted @ 2019-08-27 20:03
gmlgxx
阅读(58)
评论(0)
推荐(0)
摘要:
python集合 交集 a = {'a','b','c','d','e','f'}b = {'a','b','c','d'}pri... 阅读全文
posted @ 2019-08-27 20:00
gmlgxx
阅读(38)
评论(0)
推荐(0)
摘要:
python内建方法 内建方法 python2中range是生成列表xrange是生成器python3中range是生成器----... 阅读全文
posted @ 2019-08-27 19:55
gmlgxx
阅读(70)
评论(0)
推荐(0)
摘要:
python内建属性 属性拦截器-1 class Itcast(object): def __init__(self,sub... 阅读全文
posted @ 2019-08-27 19:54
gmlgxx
阅读(51)
评论(0)
推荐(0)
摘要:
GC垃圾回收机制 GC的引用计数的缺点-循环引用 import gcclass Test(object): def __in... 阅读全文
posted @ 2019-08-27 19:50
gmlgxx
阅读(80)
评论(0)
推荐(0)
摘要:
python元类 动态创建类 def test(name): if name == "Foo": class ... 阅读全文
posted @ 2019-08-27 19:46
gmlgxx
阅读(59)
评论(0)
推荐(0)
摘要:
python类装饰器相关操作 对象调用自己必须-call方法 class Test(object): def __call_... 阅读全文
posted @ 2019-08-27 19:43
gmlgxx
阅读(48)
评论(0)
推荐(0)
摘要:
python动态语言的特性 给对象添加属性 class Person(object): def __init__(self,... 阅读全文
posted @ 2019-08-27 14:23
gmlgxx
阅读(60)
评论(0)
推荐(0)
摘要:
python作用域相关操作 LEGB #LEGB locals(当前所在的命名空间(如函数.模块))-->enclosing(外部... 阅读全文
posted @ 2019-08-27 14:20
gmlgxx
阅读(32)
评论(0)
推荐(0)
摘要:
python高级的相关操作 模块的重新导入 # test.py模块def test(): print("----1----"... 阅读全文
posted @ 2019-08-27 13:36
gmlgxx
阅读(40)
评论(0)
推荐(0)
浙公网安备 33010602011771号