python学习记录

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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值