PEP 3101 -- Advanced String Formatting(高级字符串格式化)

原文:https://www.python.org/dev/peps/pep-3101/

一、抽象

该PEP提出了一种用于内置字符串格式化操作的新系统,旨在替代现有的字符串格式化操作符。

二、基本原理

Python当前提供了两种字符串插值方法:

* The '%' operator for strings. [1]()
* The string.Template module. [2]()

六、参考

[1] Python Library Reference - String formating operations
[2] Python Library References - Template strings

原文地址:https://www.cnblogs.com/lit10050528/p/13434624.html