摘要: 转自:http://www.zeuux.com/blog/content/3030/示例代码:>>> class A ( object ): ... def foo ( self , x ): ... print "executing foo(%s,%s)" %( self , x ) ... ... @classmethod ... def class_foo ( cls , x ): ... print "executing class_foo(%s,%s)" %( cls , x ) ... ... @sta... 阅读全文
posted @ 2013-04-27 17:26 方乙 阅读(273) 评论(0) 推荐(0) 编辑
摘要: http://deerchao.net/tutorials/regex/regex.htm这篇文章的阅读笔记。谢谢deerchao。http://www.geeksquare.net/?p=139Ubuntu下的正则表达是测试工具:kiki。sudo apt-get install kiki1.普通字符和特殊字符正则表达式用来进行字符串匹配。我理解为它表达了一个通用字符串,因此能够匹配多个字符串。普通字符:就表示自己。当然也匹配自己。例如Lucy就匹配Lucy特殊字符:也叫元字符。这钟字符具有特殊的意义。不再匹配它本身了。例如. *等。如果要匹配它们自身就要加转义字符\,取消这些字符的特殊意义 阅读全文
posted @ 2013-04-27 11:06 方乙 阅读(174) 评论(0) 推荐(0) 编辑