def unicode(s):
"""Force conversion of s to unicode."""
if PY3:
return s
else:
return __builtin__.unicode(s, 'utf-8')
# In Python 3.2+, readfp is deprecated in favor of read_file, which doesn't
# exist in Python 2 yet. To avoid deprecation warnings, subclass ConfigParser to
# fix this - now read_file works across all Python versions we care about.
评论列表
文章目录