python
koname
这个作者很懒,什么都没留下…
展开
-
理解Python中GIL锁
理解Python中GIL锁 GIL(Global Interpreter Lock)不是Python独有的特性,它只是在实现CPython(Python解释器)时,引入的一个概念。在官方网站中定义如下: In CPython, the global interpreter lock, or GIL, is a mutex that prevents multiple native threads...原创 2019-12-27 10:13:34 · 179 阅读 · 0 评论 -
python学习笔记
杨辉三角代码(迭代器生成前10行) def triangles(): a = [0]; b = [1]; n = 0; while n<10: yield b; a.extend(b); b.append(0); for i in range(len(a)): b[i] =...原创 2019-04-18 11:33:35 · 271 阅读 · 0 评论