原文: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

相关文章:

  • 2022-12-23
  • 2022-01-29
  • 2021-09-17
  • 2022-12-23
  • 2021-06-21
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案