Results of 1 - 10 of about 46 for Interpolation (0.011 sec.)
- string.templatelib --- テンプレート文字列リテラルのサポート — Python 3.14.8 ド... 14386
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » テキスト処理サービス » string.templatelib --- テンプレート文字列リテラルのサポート テーマ 自動 ライト ダーク | string.templatelib -
...ます: >>> pi = 3.14 >>> t 't-strings are new in Python { pi !s} !' Template( strings=('t-strings are new in Python ', '!'), interpolations=(Interpolation(3.14, 'pi', 's', ''),) ) 型 ¶ class string.templatelib. Template ¶ The Template class describes the conten...> type ( template ) <class 'string.templatelib.Template'> Templates are stored as sequences of literal strings and dynamic interpolations . A values attribute holds the values of the interpolations: >>> cheese = 'Camembert' >>> template = t 'Ah! We do have {...cheese } .' >>> template . strings ('Ah! We do have ', '.') >>> template . interpolations (Interpolation('Camembert', ...),) >>> template . values ('Camembert',) The strings tuple has one more element than inter... - https://man.mtool.work/python/3.14/library/string.templatelib.html
- string.templatelib --- テンプレート文字列リテラルのサポート — Python 3.14.8 ド... 14386
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » テキスト処理サービス » string.templatelib --- テンプレート文字列リテラルのサポート テーマ 自動 ライト ダーク | string.templatelib -
...ます: >>> pi = 3.14 >>> t 't-strings are new in Python { pi !s} !' Template( strings=('t-strings are new in Python ', '!'), interpolations=(Interpolation(3.14, 'pi', 's', ''),) ) 型 ¶ class string.templatelib. Template ¶ The Template class describes the conten...> type ( template ) <class 'string.templatelib.Template'> Templates are stored as sequences of literal strings and dynamic interpolations . A values attribute holds the values of the interpolations: >>> cheese = 'Camembert' >>> template = t 'Ah! We do have {...cheese } .' >>> template . strings ('Ah! We do have ', '.') >>> template . interpolations (Interpolation('Camembert', ...),) >>> template . values ('Camembert',) The strings tuple has one more element than inter... - https://man.mtool.work/python/3.14/library/string.templatelib.html
- configparser --- 設定ファイルのパーサー — Python 3.14.8 ドキュメント 9535
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ファイルフォーマット » configparser --- 設定ファイルのパーサー テーマ 自動 ライト ダーク | configparser --- 設定ファイルのパーサー
...>>> unnamed . get ( configparser . UNNAMED_SECTION , 'option' ) 'value' 値の補間 ¶ コア機能に加えて、 ConfigParser は補間(interpolation, 内挿とも)をサポートします。これは get() コールが値を返す前に、その値に対して前処理を行えることを意味します。 class config...parser. BasicInterpolation ¶ ConfigParser が使用するデフォルト実装です。値に、同じセクションか特別なデフォルトセクション中 [ 1 ] の他の値を参照するフ...ures [Escape] # use a %% to escape the % sign (% is the only character that needs to be escaped): gain : 80%% 上の例では、 interpolation に BasicInterpolation() を設定した ConfigParser が %(home_dir)s を home_dir の値(このケースでは /Users )として解決していま... - https://man.mtool.work/python/3.14/library/configparser.html
- configparser --- 設定ファイルのパーサー — Python 3.14.8 ドキュメント 9535
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ファイルフォーマット » configparser --- 設定ファイルのパーサー テーマ 自動 ライト ダーク | configparser --- 設定ファイルのパーサー
...>>> unnamed . get ( configparser . UNNAMED_SECTION , 'option' ) 'value' 値の補間 ¶ コア機能に加えて、 ConfigParser は補間(interpolation, 内挿とも)をサポートします。これは get() コールが値を返す前に、その値に対して前処理を行えることを意味します。 class config...parser. BasicInterpolation ¶ ConfigParser が使用するデフォルト実装です。値に、同じセクションか特別なデフォルトセクション中 [ 1 ] の他の値を参照するフ...ures [Escape] # use a %% to escape the % sign (% is the only character that needs to be escaped): gain : 80%% 上の例では、 interpolation に BasicInterpolation() を設定した ConfigParser が %(home_dir)s を home_dir の値(このケースでは /Users )として解決していま... - https://man.mtool.work/python/3.14/library/configparser.html
- ast --- Abstract syntax trees — Python 3.14.8 ドキュメント 7551
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python言語サービス » ast --- Abstract syntax trees テーマ 自動 ライト ダーク | ast --- Abstract syntax trees ¶ ソースコード: Lib/as
...l ( expr func , expr * args , keyword * keywords ) | FormattedValue ( expr value , int conversion , expr ? format_spec ) | Interpolation ( expr value , constant str , int conversion , expr ? format_spec ) | JoinedStr ( expr * values ) | TemplateStr ( expr * v...t. TemplateStr ( values , / ) ¶ Added in version 3.14. Node representing a template string literal, comprising a series of Interpolation and Constant nodes. These nodes may be any order, and do not need to be interleaved. >>> expr = ast . parse ( 't" {name} f...d {place:ordinal}"' , mode = 'eval' ) >>> print ( ast . dump ( expr , indent = 4 )) Expression( body=TemplateStr( values=[ Interpolation( value=Name(id='name', ctx=Load()), str='name', conversion=-1), Constant(value=' finished '), Interpolation( value=Name(id... - https://man.mtool.work/python/3.14/library/ast.html
- ast --- Abstract syntax trees — Python 3.14.8 ドキュメント 7551
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python言語サービス » ast --- Abstract syntax trees テーマ 自動 ライト ダーク | ast --- Abstract syntax trees ¶ ソースコード: Lib/as
...l ( expr func , expr * args , keyword * keywords ) | FormattedValue ( expr value , int conversion , expr ? format_spec ) | Interpolation ( expr value , constant str , int conversion , expr ? format_spec ) | JoinedStr ( expr * values ) | TemplateStr ( expr * v...t. TemplateStr ( values , / ) ¶ Added in version 3.14. Node representing a template string literal, comprising a series of Interpolation and Constant nodes. These nodes may be any order, and do not need to be interleaved. >>> expr = ast . parse ( 't" {name} f...d {place:ordinal}"' , mode = 'eval' ) >>> print ( ast . dump ( expr , indent = 4 )) Expression( body=TemplateStr( values=[ Interpolation( value=Name(id='name', ctx=Load()), str='name', conversion=-1), Constant(value=' finished '), Interpolation( value=Name(id... - https://man.mtool.work/python/3.14/library/ast.html
- dis --- Python バイトコードの逆アセンブラー — Python 3.14.8 ドキュメント 7505
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python言語サービス » dis --- Python バイトコードの逆アセンブラー テーマ 自動 ライト ダーク | dis --- Python バイトコードの逆アセンブ
...bodies. Added in version 3.12. BUILD_TEMPLATE ¶ Constructs a new Template instance from a tuple of strings and a tuple of interpolations and pushes the resulting object onto the stack: interpolations = STACK . pop () strings = STACK . pop () STACK . append (..._build_template ( strings , interpolations )) Added in version 3.14. BUILD_INTERPOLATION ( format ) ¶ Constructs a new Interpolation instance from a value and its s...conversion or format specification is present, format is set to 2 . If the low bit of format is set, it indicates that the interpolation contains a format specification. If format >> 2 is non-zero, it indicates that the interpolation contains a conversion. Th... - https://man.mtool.work/python/3.14/library/dis.html
- dis --- Python バイトコードの逆アセンブラー — Python 3.14.8 ドキュメント 7505
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python言語サービス » dis --- Python バイトコードの逆アセンブラー テーマ 自動 ライト ダーク | dis --- Python バイトコードの逆アセンブ
...bodies. Added in version 3.12. BUILD_TEMPLATE ¶ Constructs a new Template instance from a tuple of strings and a tuple of interpolations and pushes the resulting object onto the stack: interpolations = STACK . pop () strings = STACK . pop () STACK . append (..._build_template ( strings , interpolations )) Added in version 3.14. BUILD_INTERPOLATION ( format ) ¶ Constructs a new Interpolation instance from a value and its s...conversion or format specification is present, format is set to 2 . If the low bit of format is set, it indicates that the interpolation contains a format specification. If format >> 2 is non-zero, it indicates that the interpolation contains a conversion. Th... - https://man.mtool.work/python/3.14/library/dis.html
- What's new in Python 3.14 — Python 3.14.8 ドキュメント 7399
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's new in Python 3.14 テーマ 自動 ライト ダーク | What's new in Python 3.14 ¶ エディタ : Adam Turner と Hugo van Kemenade この記事では
...ることができます。 Template のインスタンスに反復を行うことで、各部分を順に取り出せます: >>> list ( template ) ['Try some ', Interpolation('Stilton', 'variety', None, ''), ' cheese!'] Template インスタンスを処理するコードは書くのも呼び出すのも簡単です。例えば以...下の例は、固定部分を小文字で、 Interpolation インスタンスを大文字で表示する関数です: from string.templatelib import Interpolation def lower_upper ( template ): """固定...の箇所は小文字に、interpolationsは大文字に変換する""" parts = [] for part in template : if isinstance ( part , Interpolation ): parts . append ( str ( par... - https://man.mtool.work/python/3.14/whatsnew/3.14.html
- What's new in Python 3.14 — Python 3.14.8 ドキュメント 7399
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's new in Python 3.14 テーマ 自動 ライト ダーク | What's new in Python 3.14 ¶ エディタ : Adam Turner と Hugo van Kemenade この記事では
...ることができます。 Template のインスタンスに反復を行うことで、各部分を順に取り出せます: >>> list ( template ) ['Try some ', Interpolation('Stilton', 'variety', None, ''), ' cheese!'] Template インスタンスを処理するコードは書くのも呼び出すのも簡単です。例えば以...下の例は、固定部分を小文字で、 Interpolation インスタンスを大文字で表示する関数です: from string.templatelib import Interpolation def lower_upper ( template ): """固定...の箇所は小文字に、interpolationsは大文字に変換する""" parts = [] for part in template : if isinstance ( part , Interpolation ): parts . append ( str ( par... - https://man.mtool.work/python/3.14/whatsnew/3.14.html