2018/06/1-2018/06/4 参考资料: [菜鸟教程](http://www.runoob.com/python3/python3-examples.html) [Python解惑:True与False](https://foofish.net/python-true-false.html) [python里None 表示False吗?](https://www.zhihu.com/question/48707732) 学习过程中有下面一段简单的代码,但自己却还写不出精确的注释,需要把…
2018/05/31-2018/06/1 [官方文档](https://www.jetbrains.com/help/pycharm/set-up-a-git-repository.html) 通过pycharm commit代码时,报错:Can't finish Github sharing process. Successfully created project 'Python' on GitHub, but initial commit failed: unable to auto-de…
2018/05/29 [来源:菜鸟教程](http://www.runoob.com/python3/python3-examples.html) 运算符重载 https://segmentfault.com/a/1190000013456795 https://zhuanlan.zhihu.com/p/20584316 [这个解释比较通俗易懂](https://zhidao.baidu.com/question/518493416493800005.html) #No.1 class Vect…
2018/05/ 28 [来源:菜鸟教程](http://www.runoob.com/python3/python3-examples.html) 继续敲类相关的代码 #No.1 class people: name = '' age = 0 __weight = 0 def __init__(self, n, a, w): self.name = n self.age = a self.__weight = w def speak(self): print("%s 说:我 %d 岁.&quo…
title: Python学习记录day6 tags: python author: Chinge Yang date: 2016-12-03 --- Python学习记录day6 @(学习)[python] [TOC] 1.反射 反射:利用字符串的形式去对象(默认)中操作(寻找)成员 cat commons.py #!/usr/bin/env python #_*_coding:utf-8_*_ ''' * Created on 2016/12/3 21:54. * @author: Chin…
title: Python学习记录day5 tags: python author: Chinge Yang date: 2016-11-26 --- 1.多层装饰器 多层装饰器的原理是,装饰器装饰函数后,其实也是一个函数,这样又可以被装饰器装饰. 编译是从下至上进行的,执行时是从上至下进行. #!/usr/bin/env python # _*_coding:utf-8_*_ ''' * Created on 2016/11/29 20:38. * @author: Chinge_Yang.…
目录 Python学习记录day8 1. 静态方法 2. 类方法 3. 属性方法 4. 类的特殊成员方法 4.1 __doc__表示类的描述信息 4.2 __module__ 和 __class__ 4.3 __init__ 构造方法 4.4 __del__ 析构方法 4.5 __call__ call方法 4.6 __dict__ 4.7 __str__ 方法 4.8 __getitem__.__setitem__.__delitem__ 4.9 __new__  __metaclass__…
目录 Python学习记录day7 1. 面向过程 VS 面向对象 编程范式 2. 面向对象特性 3. 类的定义.构造函数和公有属性 4. 类的析构函数 5. 类的继承 6. 经典类vs新式类 7. 多态 title: Python学习记录day7 tags: python author: Chinge Yang date: 2017-02-18 --- Python学习记录day7 @(学习)[python] 1. 面向过程 VS 面向对象 编程范式 编程是程序员用特定的语法+数据结构+算法组…
Python学习记录:括号配对检测问题 一.问题描述 在练习Python程序题的时候,我遇到了括号配对检测问题. 问题描述:提示用户输入一行字符串,其中可能包括小括号 (),请检查小括号是否配对正确,配对成功与否分别输出: 配对成功! 配对失败! 其中,小括号配对要考虑配对顺序,即()表示配对,)(不是配对,只考虑小括号配对. 一提起括号配对,我们可能会想到C语言正则表达式计算的符号优先级问题,在C语言中我们通常使用栈来解决,而在Python中我们也可以用栈的思路和方法,以列表的形式来实现它.把…
学习Selenium+Python已经好几个月了,但越学发现不懂的东西越多. 感觉最大的问题还是在于基础不扎实,决定从头开始,每天坚持读代码,写代码. 相信量变一定能到质变!!! 2018/05/09 [来源:菜鸟教程](http://www.runoob.com/python3/python3-examples.html) class float([x]) Return a floating point number constructed from a number or string x.…