Search code examples
pythonstringstring-interpolation

Where is Python's String Interpolation Operator defined formally?


I am working on an article on Python string formatting and I am curious where are the workings of the % operator defined formally. I could not find a PEP defining the operator, I only found references in the official documentation.

For Python 2.7: https://docs.python.org/2.7/library/stdtypes.html#string-formatting-operations
For Python 3.6: https://docs.python.org/3.6/library/stdtypes.html#printf-style-string-formatting

Does anyone know where I can find them?


Solution

  • Based on Steven Rumbalski's answer I have decided to mark this question as answered.

    Unfortunately it appears that there is no formal definition of the interpolation operator except for the documentation.