![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
高级主题
白酱六条
这个作者很懒,什么都没留下…
展开
-
Python高级主题教程3:Python Closures
在这篇博文中,你将学到什么是Python closure,如何定义一个closure,以及判断为什么用这个技术。1. Nonlocal variable in a nested function我们在进入closure概念之前,先理解什么是nested函数和non-local变量。定义在一个函数里面的叫nested function,能访问enclosing scope的变量。在Pytho...原创 2019-09-06 11:10:30 · 224 阅读 · 0 评论 -
Python高级主题教程1:Iterators
Iterators是可以向上迭代的对象。在这篇博客中,我们会学习到iterator如何工作,以及如何使用__iter__和__next__方法(即class中的函数)定义你自己的iterator。What are iterators in Python?Iterators在Python随处可见,for循环,comprehensions,generator等等都是用它来实现的,只是表面你看不见。...原创 2019-09-06 16:23:45 · 193 阅读 · 0 评论 -
Python高级主题教程4:Python Decorators
decoratorWhat are decorators in Python?python有个有意思的特性叫decorator,在现存代码中添加某些功能。这叫做meta-programming,试图在编译时修改另一部分程序。Prerequisites for learning decorators为了理解decorator,我们首先弄清楚Python中的一些基础。我们一定要接受Python...原创 2019-09-10 10:55:14 · 176 阅读 · 0 评论 -
How to create your own Question-Answering system easily with python
什么是智能问答(QA)The history of Machine Comprehension (MC) has its origins along with the birth of first concepts in Artificial Intelligence (AI). The brilliant Allan Turing proposed in his famous article ...原创 2019-09-18 17:10:28 · 725 阅读 · 0 评论