Results of 1 - 1 of about 1 for Leicester (0.001 sec.)
- string.templatelib --- テンプレート文字列リテラルのサポート 9414
- string.templatelib --- テンプレート文字列リテラルのサポート ソースコード: Lib/string/templatelib.py 参考 フォーマット済み文字列リテラル テンプレート文字列リテラル(t-string)の構文 PEP 750 テンプレート文字列 Added in version 3.14. テンプレート
...リテラルの構文 を使うことです。 この構文は、 f の代わりに t を前に付ける点を除いて、 f 文字列 と同じです。 >>> cheese = 'Red Leicester' >>> template = t "We're fresh out of { cheese } , sir." >>> type ( template ) <class 'string.templatelib.Template'> テンプ..., 'cheese', None, ''),) interpolations タプルは空の場合もあり、常に strings タプルより値が 1 つ少なくなります。 >>> t 'Red Leicester' . interpolations () values : tuple [ object , ... ] テンプレート内で補間されるすべての値のタプル。 >>> cheese = 'Camember... - https://man.mtool.work/python/3.14/library/string.templatelib.html
PREV
1
NEXT