From f915b6c9b5d8077a6e8d2506f5f40bc9b4b9ae0c Mon Sep 17 00:00:00 2001 From: HansBug Date: Tue, 24 May 2022 13:48:43 +0800 Subject: [PATCH] doc(hansbug): add comments for default argument --- hbutils/string/template.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hbutils/string/template.py b/hbutils/string/template.py index d5253c49cea..18cdfab131f 100644 --- a/hbutils/string/template.py +++ b/hbutils/string/template.py @@ -39,6 +39,8 @@ def env_template(template: str, environ: Optional[Mapping[str, Any]] = None, KeyError: 'B' >>> env_template('${A} + 1 = ${B}', {'A': '1'}, safe=True) '1 + 1 = ${B}' + >>> env_template('${A} + 1 = ${B}', {'A': '1'}, default='') # like environment variable + '1 + 1 = ' """ class _DefaultDict(dict):