杂记--《python学习手册(第四版)》



http://www.runoob.com/python/python-strings.html


JIT  即时编译器
IDE  集成开发环境


打包程序 py2exe、PyInstaller、freeze


调速器:IDE GUI、pdb
-254
-270
page-50-83-115-152-208-237-267-290-320-(334)359-381-(396)412-442-470-492-532-(550)568-


(589)613-(629)647-683-709-(740)774-(814)-(833)856-(871)(884)-(887)(935)-(977)(1043)(1077)




类型:数字、字符串、列表、字典、元组、文件(管道|队列|套接字|通过键访问文件|对象持久|基于描述符


的文件|数据库)、集合、(Nono、布尔型)、编程单元类型(函数、模块、类)、与实现相关的类型(编译


的代码堆栈跟踪)


数学:矩阵、向量  --NumPy
图形:   --SciPy


字符串-列表-元组:是不可变序列,不能修改对应位置的值
类型不可变:字符串-列表-元组-数字-不可变集合
可变类型:列表-字典(别名:关联数组|散列表)-可变集合


    
    ss='\t\\\"'\
       "\a"\  #响铃
       "\b"\  #倒退
       "\f"\  #换页
       "\n"\  #换行
       "\r"\  #返回
       "\v"\  #垂直制表
       "\N{id}"\  #Unicode数据库ID
       "\uhhhh"\  #Unicode 16位的16进制值
       "\Uhhhhhhhh"\  #Unicode 32位的32进制值
       "\xhh"\  #16进制值
       "\ooo"\  #8进制值
       "\0"\  #Null(不是字符串结尾)
       "\other"  #不转义




    #模块导入   import  可赋值   from  用于取值
    #import *     可修改全局变量
    #import * as name      
#exec("import " + "string")  动态导入
#string = __import__("string")  动态导入
    #from * import x    不可修改全局变量
    #from * import *
    #reload(*)   重新导入
    #import dir1.dir2.*   指定路径  -注意 需要 __init__.py文件
    #from dir1,dir2.* import z
    #from ...dir2.* import z    ...只适用from
    #__name__ __main_  sys.argv


class C1(C2, C3):
def __init__(self,who): #初始化
self.name = who
def setname(self,who):
self.name = who


class C1:pass  #空类
OOP结构归类--》设计模式




文件存储
pickle|dbm|shelve(675p)


重载函数(710p)


__slots__
staticmethod()
classmethod()
@staticmethod
@decorator  @**
Meta  --元类


try/except/else/finally
raisse
assert
with/as


异常类
BaseException
Exception
ArithmeticError
OverflowError


字符编码
unicode(ASCII)    UTF-8(ASCII)   latin-l == is_8859_1 == 8859
BOM(字节顺序标记)
十六进制转义0xE8
Unicode转义\u00c4\u00e8  \U... \u...
# -*- coding:latin-1 -*-




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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值