python 3:
整除, 复数表示, slice, range, pass关键字, 函数用参数名调用,函数的*arg和**arg, 默认参数, Unpacking Argument Lists, sequence 类型:list, set , tuple, dictionary,queue,stack; loop相关:enumurate, zip,reversed, sorted; sequence的顺序比较
__name__, __main__, pyc, pyo, dir, __path__, package, __init__, __all__,str, repr, string.format, %, open, pickle, try-except [as]-else=finally, with, nonlocal, global, class doc string, class method object, 私有变量, 模拟c结构, __iter__, __next__, yield,__init__, __add__, __str__, __cmp__
python essiential reference 4th:
闭包, context management, decorator, Generators and Coroutines, Generator Expressions, Declarative Programming, lambda, eval, exec, compile, Static Methods and Class Methods, Properties, Descriptors, Object Memory Management, Object Representation and Attribute Binding, __slots__, Abstract Base Classes, Metaclasses, namespace, module search path, program args, optparse, fileinput module, distutils, py2exe,__del__
nonlocal, frame object, code object, traceback object, generator object, slice object, ellipsis object
141
python text process:
urllib2, re, enumurate, xrange, string.Template用法和场合?mako, cheetah, zope page
templates, Reportlab, xlwt,odf, pyparsing, nltk,nucular
map,reduce, filter, list comprehensive
python标准库:
getopt 解析命令行
copy 对象拷贝
operator 操作符
sys python环境
types 类型
filecmp 文件比较,可以比较大小,时间以及内容(可选)
fileinput 从命令行打开多个文件
glob 搜索
os.path 文件目录路径操作, os.path.walk可以遍历文件夹
shutil shell操作,包括文件拷贝等
tempfile 临时文件
commands 命令行
os 操作系统功能,主要os基本命令行都有对应,以及进程处理,命名管道处理
random 随机数产生,也可以产生多个随机分布数
struct 产生结构,用于调用c
time 时间函数
python的反射:
callable
getattr(obj, attrname)
python的and和or运算
python模拟c的?操作符
1 and a or b
0 and a or b