class List: def __init__(self,x): self.seq=list(x) def append(self,value): if not isinstance(value,str): raise TypeError('must be str') self.seq.appen ...
分类:
其他好文 时间:
2017-04-28 23:31:34
阅读次数:
140
"SELECT table_id, FROM table WHERE (timediff('%s',raise_time)<'00:05:00')" % \( table_id , str(datetime.datetime.now())) ...
分类:
数据库 时间:
2017-04-28 10:34:59
阅读次数:
447
1、类和实例 #类是抽象的模板,比如Student类,而实例是根据类创建出来的一个个具体的“对象”,每个对象都拥有相同的方法,但各自的数据可能不同。 #__init__ 方法 ,其第一个参数永远是self,print_score也是方法。 name score 属性 class Student(ob ...
分类:
编程语言 时间:
2017-04-28 00:19:45
阅读次数:
267
建立数据库连接defcreate_db_connect():
"""
briefinfofor:create_db_connect
建立数据库链接
Args:
Return:
Raise:
"""
conn=MySQLdb.connect(host="rm-uf6wz3f7kb8sx983zo.mysql.rds.aliyuncs.com",
user="pv_cms",
passwd="pv_cms@123",
port=3306,
charset="utf8",
db="pv_..
分类:
数据库 时间:
2017-04-27 19:50:06
阅读次数:
186
一、报错类型 二、捕获异常 三、抛出异常(raise) ...
分类:
编程语言 时间:
2017-04-25 00:38:13
阅读次数:
193
#继承"""class LIST(list): def append(self, p_object): if not isinstance(p_object,int): raise TypeError('must be int') super().append(p_object) def inser ...
分类:
其他好文 时间:
2017-04-24 19:49:08
阅读次数:
133
QQpet exploratory park QQpet exploratory park Today, more and more people begin to raise a QQpet. You can get a lot of pleasure from it, although it d ...
分类:
其他好文 时间:
2017-04-22 17:30:41
阅读次数:
231
这几天学习python,写正则表达式相关代码如下: 报错如下: raise error("look-behind requires fixed-width pattern")sre_constants.error: look-behind requires fixed-width pattern 在 ...
分类:
编程语言 时间:
2017-04-14 23:53:34
阅读次数:
2100
In this paper, we raise important issues on scalability and the required degree of supervision of existing Mahalanobis metric learning methods. Often ...
分类:
其他好文 时间:
2017-04-14 16:26:27
阅读次数:
801
1、kill函数 2、raise函数 3、sigqueue函数 4、alarm函数 5、getitimer/setitimer函数 6、abort函数 ...
分类:
其他好文 时间:
2017-04-10 18:40:30
阅读次数:
189