python之函数用法basestring
# -*- coding: utf-8 -*- #python 27 #xiaodeng #python之函数用法basestring #http://www.cnblogs.com/oneday/archive/2012/08/16/2643039.html #basestring() #说明:basestring是str和unicode的超类。 #意义有限,仅作了解 print isinstance('xiaodeng',str)#True print isinstance('xiaodeng',unicode)#False print isinstance(u'xiaodeng',unicode)#True print isinstance('xiaodeng',basestring)#True print isinstance(u'凤梅',unicode)#True print isinstance(u'凤梅',basestring)#True
无语言基础,自学python所做的各种笔记,欢迎大牛指点.