![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python3
喝可乐_耍酒疯
这个作者很懒,什么都没留下…
展开
-
python3 asyncio库学习(一)—— coroutine, task , future的区别
18.5.3.1. Coroutines¶Coroutines used with asyncio may be implemented using the async def statement, or by using generators. The async def type of coroutine was added in Python 3.5, and is recommended...原创 2019-06-04 16:05:15 · 1249 阅读 · 0 评论 -
python3 asyncio库学习(二)—— corcurrent和asyncio的效率对比
(1) corcurrent线程池(python3)#!/usr/bin/python3import socketimport sysimport ssl#from multiprocessing import Poolimport concurrent.futuresfrom contextlib import closingimport timeimport certifi...原创 2019-06-04 16:13:23 · 369 阅读 · 0 评论 -
python3 asyncio库学习(三)—— 协程的超时处理和取消
import asyncioimport osimport timefrom asyncio.subprocess import PIPE, STDOUTfrom threading import Threadfrom log_helper import *@asyncio.coroutinedef do_task(domain, loop): print(11111111...原创 2019-06-04 16:14:47 · 3273 阅读 · 0 评论 -
python 坑爹的字符编码
Unicode 的历史:(摘自python文档Howto部分)1968年,美国的ACSII(the American Standard Code for Information Interchange)提出了使用0-127的表示字符。但是,这没有考虑到重音字 母, 比如‘é’之类的。1980年代,所有的个人电脑都是8位, 可以表示0-255的所有字符。也出现了对应于不同语言的编码, 比如俄语...原创 2019-06-04 16:37:07 · 136 阅读 · 0 评论