摘要: Python自省 这个也是python彪悍的特性. 自省就是面向对象的语言所写的程序在运行时,所能知道对象的类型.简单一句就是运行时能够获得对象的类型.比如type(),dir(),getattr(),hasattr(),isinstance(). a = [1,2,3] b = {'a':1,'b 阅读全文
posted @ 2017-12-19 15:38 雪芹 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 类变量: ​ 是可在类的所有实例之间共享的值(也就是说,它们不是单独分配给每个实例的)。例如下例中,num_of_instance 就是类变量,用于跟踪存在着多少个Test 的实例。 实例变量: 实例化之后,每个实例单独拥有的变量。 class Test(object): num_of_instan 阅读全文
posted @ 2017-12-19 15:33 雪芹 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 在python中,strings, 元组tuples, 和numbers是不可更改的对象,而list,dict等则是可以修改的对象。 a = 1 def fun(a): a = 2 fun(a) print a # 1 a = [] def fun(a): a.append(1) fun(a) pr 阅读全文
posted @ 2017-12-19 14:55 雪芹 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 转载自 http://bbs.9ria.com/thread-288394-1-1.html 1. 请简述值类型与引用类型的区别答:区别:1.值类型存储在内存栈中,引用类型数据存储在内存堆中,而内存单元中存放的是堆中存放的地址。2.值类型存取快,引用类型存取慢。3.值类型表示实际数据,引用类型表示指 阅读全文
posted @ 2017-08-01 13:46 雪芹 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 速查表: char -128 ~ +127 (1 Byte)short -32767 ~ + 32768 (2 Bytes)unsigned short 0 ~ 65536 (2 Bytes)int -2147483648 ~ +2147483647 (4 Bytes)unsigned int 0 阅读全文
posted @ 2017-07-20 11:38 雪芹 阅读(4107) 评论(0) 推荐(0) 编辑
摘要: https://www.zhihu.com/question/27544895 三维几何学基础:三维坐标系统点与矢量矩阵与几何变换四元数与三维旋转 阅读全文
posted @ 2017-07-17 13:47 雪芹 阅读(177) 评论(0) 推荐(0) 编辑
摘要: BitConverter.ToString 方法 (Byte[]) 网址:https://msdn.microsoft.com/zh-cn/library/3a733s97(v=vs.110).aspx BitConverter.GetBytes(int) 网址:http://www.cnblogs 阅读全文
posted @ 2017-06-30 15:43 雪芹 阅读(2227) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/chenxizhang/archive/2011/09/10/2172994.html 阅读全文
posted @ 2017-04-20 14:49 雪芹 阅读(107) 评论(0) 推荐(0) 编辑