Python >= 2.4 的高级字符串格式化
项目描述
StringFormat是Python 3高级字符串格式化的独立端口,兼容Python >= 2.4。此实现为纯Python。
如果缺失,则添加str.format方法(Python < 2.6)
import stringformat stringformat.init()
在Python 2.6中也启用字段自动编号("{} {}"代替"{0} {1}")
import sys import stringformat if sys.version_info < (2, 7): stringformat.init(True)
自Python 2.6起,高级字符串格式化已正式纳入语言。
https://docs.pythonlang.cn/whatsnew/2.6.html#pep-3101-advanced-string-formatting
项目详细信息
关闭
StringFormat-0.5.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a9f22724f84accb8e8db60a0d49f08712a7e1c2c346162ce1536389077db7a9d |
|
MD5 | 88ea58da0c17c66d05c527c70f4c914d |
|
BLAKE2b-256 | 291ceb571296afd851fde78591c78b83968a0d05627b6d2c257ec980a1160884 |