| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 02d6a42 commit 9ad78a5
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ msgstr "" | |||
| 10 | 10 | "Report-Msgid-Bugs-To: \n" | |
| 11 | 11 | "POT-Creation-Date: 2018-06-30 05:56+0900\n" | |
| 12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
| 13 | - "Last-Translator: Naoki INADA <songofacandy@gmail.com>, 2017\n" | ||
| 13 | + "Last-Translator: takey <taketakeyyy@gmail.com>, 2018\n" | ||
| 14 | 14 | "Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n" | |
| 15 | 15 | "MIME-Version: 1.0\n" | |
| 16 | 16 | "Content-Type: text/plain; charset=UTF-8\n" | |
@@ -88,6 +88,8 @@ msgid "" | |||
| 88 | 88 | "packages to be installed for use by a particular application, rather than " | |
| 89 | 89 | "being installed system wide." | |
| 90 | 90 | msgstr "" | |
| 91 | + "*仮想環境* " | ||
| 92 | + "は、システム全体にインストールするのではなく、特定のアプリケーションで使用するためにパッケージをインストールできるようにする半独立型のPython環境です。" | ||
| 91 | 93 | ||
| 92 | 94 | #: ../../installing/index.rst:40 | |
| 93 | 95 | msgid "" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -190,7 +190,7 @@ msgid "" | |||
| 190 | 190 | "``eq`` and ``frozen`` flags in the :func:`dataclass` decorator." | |
| 191 | 191 | msgstr "" | |
| 192 | 192 | ":meth:`__hash__` は、組み込みの :meth:`hash()` から使われたり、 dict や set のようなハッシュ化されたコレクションにオブジェクトを追加するときに使われます。\n" | |
| 193 | - ":meth:`__hash__` があるということはそのクラスのインスタンスが変更不能であることを意味します。\n" | ||
| 193 | + ":meth:`__hash__` があるということはそのクラスのインスタンスが不変 (イミュータブル) であることを意味します。\n" | ||
| 194 | 194 | "可変性というのは複雑な性質で、プログラマの意図、 :meth:`__eq__` が存在しているかどうかとその振る舞い、 :func:`dataclass` デコレータの ``eq`` フラグと ``frozen`` フラグの値に依存します。" | |
| 195 | 195 | ||
| 196 | 196 | #: ../../library/dataclasses.rst:131 | |
@@ -214,6 +214,10 @@ msgid "" | |||
| 214 | 214 | " your class is logically immutable but can nonetheless be mutated. This is a" | |
| 215 | 215 | " specialized use case and should be considered carefully." | |
| 216 | 216 | msgstr "" | |
| 217 | + ":meth:`__hash__` が明示的に定義されていなかったり、 ``None`` に設定されていた場合は、 :func:`dataclass` は暗黙的に :meth:`__hash__` メソッドを追加する *かもしれません* 。\n" | ||
| 218 | + "推奨はできませんが、 ``unsafe_hash=True`` とすることで :func:`dataclass` に :meth:`__hash__` メソッドを作成させられます。\n" | ||
| 219 | + "こうしてしまうと、クラスが論理的には不変だがそれにもかかわらず変更できてしまう場合、問題になり得ます。\n" | ||
| 220 | + "こうするのは特別なユースケースで、慎重に検討するべきです。" | ||
| 217 | 221 | ||
| 218 | 222 | #: ../../library/dataclasses.rst:144 | |
| 219 | 223 | msgid "" | |
@@ -222,6 +226,8 @@ msgid "" | |||
| 222 | 226 | " dataclass and set ``unsafe_hash=True``; this will result in a " | |
| 223 | 227 | ":exc:`TypeError`." | |
| 224 | 228 | msgstr "" | |
| 229 | + ":meth:`__hash__` メソッドが暗黙的に作られるかどうかを決定する規則は次の通りです。\n" | ||
| 230 | + "データクラスに明示的な :meth:`__hash__` メソッドを持たせた上で、 ``unsafe_hash=True`` と設定することはできません; こうすると :exc:`TypeError` になります。" | ||
| 225 | 231 | ||
| 226 | 232 | #: ../../library/dataclasses.rst:149 | |
| 227 | 233 | msgid "" | |
@@ -233,6 +239,9 @@ msgid "" | |||
| 233 | 239 | "of the superclass will be used (if the superclass is :class:`object`, this " | |
| 234 | 240 | "means it will fall back to id-based hashing)." | |
| 235 | 241 | msgstr "" | |
| 242 | + "``eq`` と ``frozen`` が両方とも真だった場合、デフォルトでは :func:`dataclass` は :meth:`__hash__` メソッドを生成します。\n" | ||
| 243 | + "``eq`` が真で ``frozen`` が偽の場合、:meth:`__hash__` は ``None`` に設定され、(可変なので) ハッシュ化不可能とされます。\n" | ||
| 244 | + "``eq`` が偽の場合は、 :meth:`__hash__` は手を付けないまま、つまりスーパークラスの :meth:`__hash__` メソッドが使われることになります (スーパークラスが :class:`object` だった場合は、 id に基づいたハッシュ化にフォールバックするということになります)。" | ||
| 236 | 245 | ||
| 237 | 246 | #: ../../library/dataclasses.rst:157 | |
| 238 | 247 | msgid "" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments