python 3 module of the week

来源:互联网 发布:淘宝订单非支付宝交易 编辑:程序博客网 时间:2024/05/29 10:58

在网上看到一篇比较好的学习python标准库的tutorial:Python 3 Module of the Week. 决定学习一下,因为很多是时候等到需要用的时候再去临时学习,虽然大多数情况下也能对付过去,但是缺点很明显:

  • 分散精力:我需要集中精力学习这些基础知识,而不是专注于我要解决的问题。

  • 不知道某些库的存在:有时候没想到有些操作会有标准库实现,如果我感觉这个任务很简单,我会自己去实现。重复造轮子的缺点就不多说了,造过轮子的都知道。

  • 没法高效的使用:很多库都存在所谓的”best practice”, 但是如果是临时抱佛脚的学习, 往往会停留在 “just work” 的级别,执行效率,后续的维护都很困难。

因为CSDN暂时不支持jupyter notebook. 所以 代码会放在github上面:
note: 如无特殊说明,默认的python版本是3.5

Developer Tools

Text

  • string module
  • textwrap — Formatting Text Paragraphs
  • difflib
  • re

Data Structure

  • collections

  • enum

  • queue

Dates and Times

  • time
  • csv
  • xml

Developer tools

  • profile time and memory of python

  • unittest

  • python2 to python3

Language Tool

  • inspect

The internet

  • JSON

Concurrency with Processes, Threads, and Coroutines

  • subprocess

  • signal

  • threading

  • multiprocessing

原创粉丝点击