Skip to content

remove_dict_keyRemoveDictKeyRemoveDictKeyremove_dict_keyT_remove_dict_key🔗

説明🔗

remove_dict_keyRemoveDictKeyRemoveDictKeyremove_dict_keyT_remove_dict_key — ディクショナリからキーを削除する。

書式🔗

remove_dict_key( dict DictHandle, string Key )void RemoveDictKey( const HTuple& DictHandle, const HTuple& Key )static void HOperatorSet.RemoveDictKey( HTuple dictHandle, HTuple key )def remove_dict_key( dict_handle: HHandle, key: MaybeSequence[Union[str, int]] ) -> None

Herror T_remove_dict_key( const Htuple DictHandle, const Htuple Key )

void HDict::RemoveDictKey( const HTuple& Key ) const

void HDict::RemoveDictKey( const HString& Key ) const

void HDict::RemoveDictKey( const char* Key ) const

void HDict::RemoveDictKey( const wchar_t* Key ) const (Windows only)

void HDict.RemoveDictKey( HTuple key )

void HDict.RemoveDictKey( string key )

説明🔗

remove_dict_keyRemoveDictKey は、Keykeykey で指定されたキーを DictHandledictHandledict_handle に渡されたディクショナリから削除します。 そして、そられのキーに関連付けられたすべてのデータ(tuple や オブジェクト)を開放します。

1つ以上のキーを処理している間に(特に、もしキーが無効だったとき)、エラーが発生した場合、このオペレータは、適切な失敗の報告を上げる前に、 できるだけ多くのキーを削除しようと試みます。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

このオペレータは以下の入力パラメータの状態を変更します :

このパラメータの値は外部同期なしには複数スレッド間で共有されません。

パラメーター🔗

DictHandledictHandledict_handle (input_control, 状態が変更されました) dict → (handle)HTuple (HHandle)HDict, HTuple (IntPtr)HHandleHtuple (handle)

ディクショナリのハンドル

要素数: DictHandle == 1

Keykeykey (input_control) string(-array) → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)MaybeSequence[Union[str, int]]Htuple (char* / Hlong)

削除するキー

制限: length(Key) > 0

例🔗

(HDevelop)


* Remove all keys
get_dict_param (Dict, 'keys', [], Keys)
remove_dict_key (Dict, Keys)

結果🔗

すべてのオペレータのパラメータが有効である場合、remove_dict_keyRemoveDictKey は 2 (H_MSG_TRUE) を返します。 そうでない場合は、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

create_dictCreateDict

後処理の候補

get_dict_paramGetDictParam

関連項目

create_dictCreateDict, set_dict_tupleSetDictTuple, get_dict_tupleGetDictTuple, set_dict_objectSetDictObject, get_dict_objectGetDictObject, get_dict_paramGetDictParam

モジュール🔗

Foundation