Skip to content

Commit

Permalink
doc(hansbug): add comments for default argument
Browse files Browse the repository at this point in the history
  • Loading branch information
HansBug committed May 24, 2022
1 parent 694eecd commit f915b6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hbutils/string/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f915b6c

Please sign in to comment.