@@ -16,7 +16,7 @@ msgid ""
1616msgstr ""
1717"Project-Id-Version : Python 3.9\n "
1818"Report-Msgid-Bugs-To : \n "
19- "POT-Creation-Date : 2021-02-03 05:20 +0000\n "
19+ "POT-Creation-Date : 2021-03-14 05:42 +0000\n "
2020"PO-Revision-Date : 2017-02-16 17:44+0000\n "
2121"Last-Translator : mollinaca, 2020\n "
2222"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -845,7 +845,7 @@ msgid ""
845845msgstr ""
846846
847847#: ../../howto/descriptor.rst:1133
848- msgid "Static methods"
848+ msgid "Other kinds of methods"
849849msgstr ""
850850
851851#: ../../howto/descriptor.rst:1135
@@ -907,7 +907,11 @@ msgstr "f(type(obj), \\*args)"
907907msgid "f(cls, \\ *args)"
908908msgstr ""
909909
910- #: ../../howto/descriptor.rst:1156
910+ #: ../../howto/descriptor.rst:1158
911+ msgid "Static methods"
912+ msgstr ""
913+
914+ #: ../../howto/descriptor.rst:1160
911915msgid ""
912916"Static methods return the underlying function without changes. Calling "
913917"either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into "
@@ -919,13 +923,13 @@ msgstr ""
919923"\" f\" )`` や ``object.__getattribute__(C, \" f\" )`` "
920924"を直接探索するのと同じです。結果として、関数はオブジェクトとクラスから同じようにアクセスできます。"
921925
922- #: ../../howto/descriptor.rst:1162
926+ #: ../../howto/descriptor.rst:1166
923927msgid ""
924928"Good candidates for static methods are methods that do not reference the "
925929"``self`` variable."
926930msgstr "静的メソッドにすると良いのは、 ``self`` 変数への参照を持たないメソッドです。"
927931
928- #: ../../howto/descriptor.rst:1165
932+ #: ../../howto/descriptor.rst:1169
929933msgid ""
930934"For instance, a statistics package may include a container class for "
931935"experimental data. The class provides normal methods for computing the "
@@ -941,30 +945,30 @@ msgstr ""
941945"は統計上の便利な変換ルーチンですが、特定のデータセットに直接には依存しません。これは、オブジェクトからでもクラスからでも呼び出せます: "
942946"``s.erf(1.5) --> .9332`` または ``Sample.erf(1.5) --> .9332`` 。"
943947
944- #: ../../howto/descriptor.rst:1174
948+ #: ../../howto/descriptor.rst:1178
945949msgid ""
946950"Since static methods return the underlying function with no changes, the "
947951"example calls are unexciting:"
948952msgstr ""
949953
950- #: ../../howto/descriptor.rst:1191
954+ #: ../../howto/descriptor.rst:1195
951955msgid ""
952956"Using the non-data descriptor protocol, a pure Python version of "
953957":func:`staticmethod` would look like this:"
954958msgstr ""
955959
956- #: ../../howto/descriptor.rst:1207
960+ #: ../../howto/descriptor.rst:1211
957961msgid "Class methods"
958962msgstr ""
959963
960- #: ../../howto/descriptor.rst:1209
964+ #: ../../howto/descriptor.rst:1213
961965msgid ""
962966"Unlike static methods, class methods prepend the class reference to the "
963967"argument list before calling the function. This format is the same for "
964968"whether the caller is an object or a class:"
965969msgstr ""
966970
967- #: ../../howto/descriptor.rst:1227
971+ #: ../../howto/descriptor.rst:1231
968972msgid ""
969973"This behavior is useful whenever the method only needs to have a class "
970974"reference and does not rely on data stored in a specific instance. One use "
@@ -973,61 +977,61 @@ msgid ""
973977"of keys. The pure Python equivalent is:"
974978msgstr ""
975979
976- #: ../../howto/descriptor.rst:1244
980+ #: ../../howto/descriptor.rst:1248
977981msgid "Now a new dictionary of unique keys can be constructed like this:"
978982msgstr ""
979983
980- #: ../../howto/descriptor.rst:1254
984+ #: ../../howto/descriptor.rst:1258
981985msgid ""
982986"Using the non-data descriptor protocol, a pure Python version of "
983987":func:`classmethod` would look like this:"
984988msgstr ""
985989
986- #: ../../howto/descriptor.rst:1292
990+ #: ../../howto/descriptor.rst:1296
987991msgid ""
988992"The code path for ``hasattr(obj, '__get__')`` was added in Python 3.9 and "
989993"makes it possible for :func:`classmethod` to support chained decorators. For"
990994" example, a classmethod and property could be chained together:"
991995msgstr ""
992996
993- #: ../../howto/descriptor.rst:1311
997+ #: ../../howto/descriptor.rst:1315
994998msgid "Member objects and __slots__"
995999msgstr ""
9961000
997- #: ../../howto/descriptor.rst:1313
1001+ #: ../../howto/descriptor.rst:1317
9981002msgid ""
9991003"When a class defines ``__slots__``, it replaces instance dictionaries with a"
10001004" fixed-length array of slot values. From a user point of view that has "
10011005"several effects:"
10021006msgstr ""
10031007
1004- #: ../../howto/descriptor.rst:1317
1008+ #: ../../howto/descriptor.rst:1321
10051009msgid ""
10061010"1. Provides immediate detection of bugs due to misspelled attribute "
10071011"assignments. Only attribute names specified in ``__slots__`` are allowed:"
10081012msgstr ""
10091013
1010- #: ../../howto/descriptor.rst:1333
1014+ #: ../../howto/descriptor.rst:1337
10111015msgid ""
10121016"2. Helps create immutable objects where descriptors manage access to private"
10131017" attributes stored in ``__slots__``:"
10141018msgstr ""
10151019
1016- #: ../../howto/descriptor.rst:1368
1020+ #: ../../howto/descriptor.rst:1372
10171021msgid ""
10181022"3. Saves memory. On a 64-bit Linux build, an instance with two attributes "
10191023"takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight "
10201024"design pattern <https://en.wikipedia.org/wiki/Flyweight_pattern>`_ likely "
10211025"only matters when a large number of instances are going to be created."
10221026msgstr ""
10231027
1024- #: ../../howto/descriptor.rst:1373
1028+ #: ../../howto/descriptor.rst:1377
10251029msgid ""
10261030"4. Blocks tools like :func:`functools.cached_property` which require an "
10271031"instance dictionary to function correctly:"
10281032msgstr ""
10291033
1030- #: ../../howto/descriptor.rst:1395
1034+ #: ../../howto/descriptor.rst:1399
10311035msgid ""
10321036"It is not possible to create an exact drop-in pure Python version of "
10331037"``__slots__`` because it requires direct access to C structures and control "
@@ -1037,36 +1041,36 @@ msgid ""
10371041"managed by member descriptors:"
10381042msgstr ""
10391043
1040- #: ../../howto/descriptor.rst:1438
1044+ #: ../../howto/descriptor.rst:1442
10411045msgid ""
10421046"The :meth:`type.__new__` method takes care of adding member objects to class"
10431047" variables:"
10441048msgstr ""
10451049
1046- #: ../../howto/descriptor.rst:1454
1050+ #: ../../howto/descriptor.rst:1458
10471051msgid ""
10481052"The :meth:`object.__new__` method takes care of creating instances that have"
10491053" slots instead of an instance dictionary. Here is a rough simulation in "
10501054"pure Python:"
10511055msgstr ""
10521056
1053- #: ../../howto/descriptor.rst:1489
1057+ #: ../../howto/descriptor.rst:1493
10541058msgid ""
10551059"To use the simulation in a real class, just inherit from :class:`Object` and"
10561060" set the :term:`metaclass` to :class:`Type`:"
10571061msgstr ""
10581062
1059- #: ../../howto/descriptor.rst:1503
1063+ #: ../../howto/descriptor.rst:1507
10601064msgid ""
10611065"At this point, the metaclass has loaded member objects for *x* and *y*::"
10621066msgstr ""
10631067
1064- #: ../../howto/descriptor.rst:1524
1068+ #: ../../howto/descriptor.rst:1528
10651069msgid ""
10661070"When instances are created, they have a ``slot_values`` list where the "
10671071"attributes are stored:"
10681072msgstr ""
10691073
1070- #: ../../howto/descriptor.rst:1536
1074+ #: ../../howto/descriptor.rst:1540
10711075msgid "Misspelled or unassigned attributes will raise an exception:"
10721076msgstr ""
0 commit comments