上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 1.普通异常的使用: 2.自己触发的异常: 阅读全文
posted @ 2017-03-22 15:58 KaShing 阅读(2023) 评论(0) 推荐(0) 编辑
摘要: 1.针对类中方法的反射 2.针对类成员变量的使用 总的来说就是判断是否有输入的choice,若有则进行输出,若没有则进行赋值或者替换。 阅读全文
posted @ 2017-03-22 13:28 KaShing 阅读(430) 评论(0) 推荐(0) 编辑
摘要: Python3中开发目录的引用 其中我的软件包中有bin、conf、core几个目录,下面有main.py、settings.py,将其导入至主函数中而已。。。 阅读全文
posted @ 2017-03-07 09:56 KaShing 阅读(822) 评论(0) 推荐(0) 编辑
摘要: 用于将数据存取到文件中: 1:Json的存数据到文件: 2.Json的取数据 3.Pickle的存数据 4.Pickle的取数据: *若想实现Pickle的取数据(包含函数的复杂元素)必须要在取的时候声明函数。。。 阅读全文
posted @ 2017-03-06 19:40 KaShing 阅读(969) 评论(0) 推荐(0) 编辑
摘要: 1.迭代器程序(实现菲比那次数列并且可以抛出与接收异常) 2.利用迭代器实现简单的“单线程并行”吃包子(实际上还是串行) 阅读全文
posted @ 2017-03-06 10:03 KaShing 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 较为复杂的装饰器使用: 输出结果如下: auth type: lllauth type: kkkwelcome to index pageusername:hjcpassword:111111user pass ~~~~~~welcome to home pagefuck off 2.较为简单的装饰 阅读全文
posted @ 2017-03-05 22:15 KaShing 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: 比较简单没什么好说的: 输出结果如下: {1, 2, 3, 4, 5, 6, 7, 8, 999} {1, 2, 3, 444, 5}{1, 2, 3, 5}{1, 2, 3, 5}{1, 2, 3, 4, 5, 6, 7, 8, 999, 444}{1, 2, 3, 4, 5, 6, 7, 8, 阅读全文
posted @ 2017-03-03 20:03 KaShing 阅读(533) 评论(0) 推荐(0) 编辑
摘要: python3的几种传参方法(初学者): 例1: 输出为:*argv变成元组 alex('wt', 'hjc', 'lao liu') 例2: 输出为:**argv变成字典 alex{'sex': 'man', 'age': 32, 'hobby': 740} 例3: 将例1与例2混合使用,得到: 阅读全文
posted @ 2017-03-03 20:01 KaShing 阅读(987) 评论(0) 推荐(0) 编辑
摘要: product_list = [ ('iphone',5800), ('imac',15800), ('watch',9800), ('cloth',550), ('coffe latee',35), ('body call',200), ] shopping_list = [] salary = input('please input your ... 阅读全文
posted @ 2017-03-01 17:54 KaShing 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Python3 简单的三级列表思路(初学者 比较low) 代码如下: 阅读全文
posted @ 2017-03-01 17:52 KaShing 阅读(352) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页