add 'U' conversion for format strings to unquote their content

(#74)
This commit is contained in:
Mike Fährmann
2018-02-25 21:57:59 +01:00
parent 8cdce21dcb
commit 2fad0b1f1b
2 changed files with 5 additions and 0 deletions

View File

@@ -284,6 +284,7 @@ class Formatter():
- "u": calls str.upper
- "c": calls str.capitalize
- "C": calls string.capwords
- "U": calls urllib.parse.unquote
- Example: {f!l} -> "example"; {f!u} -> "EXAMPLE"
Extra Format Specifiers:
@@ -298,6 +299,7 @@ class Formatter():
"u": str.upper,
"c": str.capitalize,
"C": string.capwords,
"U": urllib.parse.unquote,
"s": str,
"r": repr,
"a": ascii,