py3compat.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:fortress 作者: rscircus 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号