Results of 1 - 10 of about 36 for deepcopy (0.059 sec.)
- copy --- 浅いコピーおよび深いコピー操作 — Python 3.14.8 ドキュメント 14073
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » copy --- 浅いコピーおよび深いコピー操作 テーマ 自動 ライト ダーク | copy --- 浅いコピーおよび深いコピー操作 ¶ ソースコー
...ます) を提供します。 以下にインターフェースをまとめます: copy. copy ( obj ) ¶ obj の浅い (shallow) コピーを返します。 copy. deepcopy ( obj [ , memo ] ) ¶ obj の深い (deep) コピーを返します。 copy. replace ( obj , / , ** changes ) ¶ Creates a new object of...オブジェクトを作成し、その後 (可能な限り) 元のオブジェクト中に見つかったオブジェクトに対する 参照 を挿入します。 深いコピー (deep copy) は新たな複合オブジェクトを作成し、その後元のオブジェクト中に見つかったオブジェクトの コピー を挿入します。 深いコピー操作...。 深いコピーは何もかもコピーしてしまうため、例えば複数のコピー間で共有するつもりだったデータも余分にコピーしてしまいます。 deepcopy() 関数では、これらの問題を以下のようにして回避しています: 現時点でのコピー過程ですでにコピーされたオブジェクトの memo 辞書... - https://man.mtool.work/python/3.14/library/copy.html
- copy --- 浅いコピーおよび深いコピー操作 — Python 3.14.8 ドキュメント 14073
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » copy --- 浅いコピーおよび深いコピー操作 テーマ 自動 ライト ダーク | copy --- 浅いコピーおよび深いコピー操作 ¶ ソースコー
...ます) を提供します。 以下にインターフェースをまとめます: copy. copy ( obj ) ¶ obj の浅い (shallow) コピーを返します。 copy. deepcopy ( obj [ , memo ] ) ¶ obj の深い (deep) コピーを返します。 copy. replace ( obj , / , ** changes ) ¶ Creates a new object of...オブジェクトを作成し、その後 (可能な限り) 元のオブジェクト中に見つかったオブジェクトに対する 参照 を挿入します。 深いコピー (deep copy) は新たな複合オブジェクトを作成し、その後元のオブジェクト中に見つかったオブジェクトの コピー を挿入します。 深いコピー操作...。 深いコピーは何もかもコピーしてしまうため、例えば複数のコピー間で共有するつもりだったデータも余分にコピーしてしまいます。 deepcopy() 関数では、これらの問題を以下のようにして回避しています: 現時点でのコピー過程ですでにコピーされたオブジェクトの memo 辞書... - https://man.mtool.work/python/3.14/library/copy.html
- unittest.mock --- 入門 — Python 3.14.8 ドキュメント 9335
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p
...that I can use the mock methods for doing the assertion. Again a helper function sets this up for me. >>> from copy import deepcopy >>> from unittest.mock import Mock , patch , DEFAULT >>> def copy_call_args ( mock ): ... new_mock = Mock () ... def side_...effect ( * args , ** kwargs ): ... args = deepcopy ( args ) ... kwargs = deepcopy ( kwargs ) ... new_mock ( * args , ** kwargs ) ... return DEFAULT ... mock . side_effect =...fect ) >>> mock ({ 6 }) >>> mock ( set ()) Traceback (most recent call last): ... AssertionError 別の方法としては、( copy.deepcopy() を使用して)引数をコピーする、 Mock や MagicMock のサブクラスを作成する方法があります。以下に実装例を示します。 >>> from... - https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
- unittest.mock --- 入門 — Python 3.14.8 ドキュメント 9335
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p
...that I can use the mock methods for doing the assertion. Again a helper function sets this up for me. >>> from copy import deepcopy >>> from unittest.mock import Mock , patch , DEFAULT >>> def copy_call_args ( mock ): ... new_mock = Mock () ... def side_...effect ( * args , ** kwargs ): ... args = deepcopy ( args ) ... kwargs = deepcopy ( kwargs ) ... new_mock ( * args , ** kwargs ) ... return DEFAULT ... mock . side_effect =...fect ) >>> mock ({ 6 }) >>> mock ( set ()) Traceback (most recent call last): ... AssertionError 別の方法としては、( copy.deepcopy() を使用して)引数をコピーする、 Mock や MagicMock のサブクラスを作成する方法があります。以下に実装例を示します。 >>> from... - https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
- Pending removal in Python 3.14 — Python 3.14.8 ドキュメント 8098
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » Pending removal in Python 3.14 テーマ 自動 ライト ダーク | Pending removal in Python 3.14 ¶ argparse : The type , choices , and metavar parameters of argparse.BooleanOptionalA
...an Kemenade in gh-93963 .) itertools had undocumented, inefficient, historically buggy, and inconsistent support for copy, deepcopy, and pickle operations. This will be removed in 3.14 for a significant reduction in code volume and maintenance burden. (C... - https://man.mtool.work/python/3.14/deprecations/pending-removal-in-3.14.html
- zlib --- gzip 互換の圧縮 — Python 3.14.8 ドキュメント 8098
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ圧縮とアーカイブ » zlib --- gzip 互換の圧縮 テーマ 自動 ライト ダーク | zlib --- gzip 互換の圧縮 ¶ For applications that requ
...使うと先頭部分が共通している複数のデータを効率的に圧縮することができます。 バージョン 3.8 で変更: Added copy.copy() and copy.deepcopy() support to compression objects. 展開オブジェクトは以下のメソッドと属性をサポートしています: Decompress. unused_data ¶ 圧...なわれるストリームのランダムなシークをスピードアップするのに利用できます。 バージョン 3.8 で変更: Added copy.copy() and copy.deepcopy() support to decompression objects. The following constants are available to configure compression and decompression behav... - https://man.mtool.work/python/3.14/library/zlib.html
- Pending removal in Python 3.14 — Python 3.14.8 ドキュメント 8098
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » Pending removal in Python 3.14 テーマ 自動 ライト ダーク | Pending removal in Python 3.14 ¶ argparse : The type , choices , and metavar parameters of argparse.BooleanOptionalA
...an Kemenade in gh-93963 .) itertools had undocumented, inefficient, historically buggy, and inconsistent support for copy, deepcopy, and pickle operations. This will be removed in 3.14 for a significant reduction in code volume and maintenance burden. (C... - https://man.mtool.work/python/3.14/deprecations/pending-removal-in-3.14.html
- zlib --- gzip 互換の圧縮 — Python 3.14.8 ドキュメント 8098
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ圧縮とアーカイブ » zlib --- gzip 互換の圧縮 テーマ 自動 ライト ダーク | zlib --- gzip 互換の圧縮 ¶ For applications that requ
...使うと先頭部分が共通している複数のデータを効率的に圧縮することができます。 バージョン 3.8 で変更: Added copy.copy() and copy.deepcopy() support to compression objects. 展開オブジェクトは以下のメソッドと属性をサポートしています: Decompress. unused_data ¶ 圧...なわれるストリームのランダムなシークをスピードアップするのに利用できます。 バージョン 3.8 で変更: Added copy.copy() and copy.deepcopy() support to decompression objects. The following constants are available to configure compression and decompression behav... - https://man.mtool.work/python/3.14/library/zlib.html
- 変更履歴 — Python 3.14.8 ドキュメント 7956
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac
...rnal __annotationlib_name_x__ name when evaluated as strings. gh-148801 : xml.etree.ElementTree : Fix a crash in Element.__deepcopy__ on deeply nested trees. gh-148735 : xml.etree.ElementTree : Fix a use-after-free in Element.findtext when the element tr..... as ... or from ... import ... as ... statement. Patch by Brian Schubert. gh-105487 : Remove non-existent __copy__() , __deepcopy__() , and __bases__ from the __dir__() entries of types.GenericAlias . gh-69605 : Fix some standard library submodules mis...e cases of very small results, on Windows versions before 11. gh-133009 : xml.etree.ElementTree : Fix a crash in Element.__deepcopy__ when the element is concurrently mutated. Patch by Bénédikt Tran. gh-91555 : Ignore log messages generated during handli... - https://man.mtool.work/python/3.14/whatsnew/changelog.html
- dataclasses --- データクラス — Python 3.14.8 ドキュメント 7797
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L
...fields, as name: value pairs. dataclasses, dicts, lists, and tuples are recursed into. Other objects are copied with copy.deepcopy() . Example of using asdict() on nested dataclasses: @dataclass class Point : x : int y : int @dataclass class C : mylist...o a tuple of its field values. dataclasses, dicts, lists, and tuples are recursed into. Other objects are copied with copy.deepcopy() . 1つ前の例の続きです: assert astuple ( p ) == ( 10 , 20 ) assert astuple ( c ) == ([( 0 , 0 ), ( 10 , 4 )],) To create... - https://man.mtool.work/python/3.14/library/dataclasses.html