摘要:
单例模式 单例模式(Singleton Pattern)是一个比较简单的模式,其定义为:Ensure a class has only one instance,and provide a global point of access to it.(确保一个类只有一个实例,而且自行实例化并向整个系统 阅读全文
摘要:
Python2.6引入了 format 格式化字符串的方法,现在格式化字符串有两种方法,就是 % 和 format ,具体这两种方法有什么区别呢?请看以下解析。 上面的代码很明显会抛出一个如下的TypeError: TypeError: not all arguments converted dur 阅读全文