Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99a2a29

Browse files
author
github-actions
committed
Merge 3.11 into 3.10
1 parent35deebf commit99a2a29

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

‎faq/programming.po

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2712,21 +2712,27 @@ msgstr "クラスはこのように使えます:"
27122712

27132713
#:../../faq/programming.rst:1952
27142714
msgid"How do I cache method calls?"
2715-
msgstr""
2715+
msgstr"メソッド呼び出しをキャッシュするには どうしたらいいですか?"
27162716

27172717
#:../../faq/programming.rst:1954
27182718
msgid""
27192719
"The two principal tools for caching methods are :func:`functools."
27202720
"cached_property` and :func:`functools.lru_cache`. The former stores results "
27212721
"at the instance level and the latter at the class level."
27222722
msgstr""
2723+
"メソッドキャッシュの主な道具は2つあり、 :func:`functools.cached_property` "
2724+
"と :func:`functools.lru_cache` です。前者はインスタンスレベル、後者はクラスレ"
2725+
"ベルで結果を保存します。"
27232726

27242727
#:../../faq/programming.rst:1959
27252728
msgid""
27262729
"The *cached_property* approach only works with methods that do not take any "
27272730
"arguments. It does not create a reference to the instance. The cached "
27282731
"method result will be kept only as long as the instance is alive."
27292732
msgstr""
2733+
"*cached_property* アプローチは、引数を取らないメソッドでのみ働きます。これは"
2734+
"インスタンスへの参照を作りません。キャッシュされたメソッドの結果は、インスタ"
2735+
"ンスが生きている間だけ保持されます。"
27302736

27312737
#:../../faq/programming.rst:1963
27322738
msgid""
@@ -2735,6 +2741,9 @@ msgid ""
27352741
"accumulate, so too will the accumulated method results. They can grow "
27362742
"without bound."
27372743
msgstr""
2744+
"利点は、インスタンスが使われなくなった場合、キャッシュされたメソッドの結果が"
2745+
"すぐに解放されることです。欠点は、インスタンスが溜まると、溜められたメソッド"
2746+
"の結果も増えてしまうことです。それらは際限なく増える恐れがあります。"
27382747

27392748
#:../../faq/programming.rst:1968
27402749
msgid""
@@ -2749,17 +2758,24 @@ msgid ""
27492758
"bounded by the specified *maxsize*. The disadvantage is that instances are "
27502759
"kept alive until they age out of the cache or until the cache is cleared."
27512760
msgstr""
2761+
"least recently used アルゴリズム(訳注:LRU 直近に使われたものを残す)の利点"
2762+
"は、キャッシュが指定された *maxsize* で制限されることです。欠点は、キャッシュ"
2763+
"から期限切れで追い出されるかクリアされるまで、インスタンスが生き続けることで"
2764+
"す。"
27522765

27532766
#:../../faq/programming.rst:1977
27542767
msgid"This example shows the various techniques::"
2755-
msgstr""
2768+
msgstr"この例は各種テクニックを示します::"
27562769

27572770
#:../../faq/programming.rst:2001
27582771
msgid""
27592772
"The above example assumes that the *station_id* never changes. If the "
27602773
"relevant instance attributes are mutable, the *cached_property* approach "
27612774
"can't be made to work because it cannot detect changes to the attributes."
27622775
msgstr""
2776+
"上の例では、 *station_id* が常に変わらないことを前提としています。関連するイ"
2777+
"ンスタンスの属性が可変である場合、 *cached_property* アプローチは属性の変更を"
2778+
"検出できないため、機能しなくなります。"
27632779

27642780
#:../../faq/programming.rst:2006
27652781
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp