@@ -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-04-04 05:56 +0000\n "
19+ "POT-Creation-Date : 2021-04-23 06:07 +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 "
@@ -737,13 +737,13 @@ msgid ""
737737"The documentation shows a typical use to define a managed attribute ``x``:"
738738msgstr ""
739739
740- #: ../../howto/descriptor.rst:956
740+ #: ../../howto/descriptor.rst:970
741741msgid ""
742742"To see how :func:`property` is implemented in terms of the descriptor "
743743"protocol, here is a pure Python equivalent:"
744744msgstr ""
745745
746- #: ../../howto/descriptor.rst:1049
746+ #: ../../howto/descriptor.rst:1063
747747msgid ""
748748"The :func:`property` builtin helps whenever a user interface has granted "
749749"attribute access and then subsequent changes require the intervention of a "
@@ -752,7 +752,7 @@ msgstr ""
752752"組み込みの :func:`property` "
753753"関数は、ユーザインターフェースへの属性アクセスが与えられ、続く変更がメソッドの介入を要求するときに役立ちます。"
754754
755- #: ../../howto/descriptor.rst:1053
755+ #: ../../howto/descriptor.rst:1067
756756msgid ""
757757"For instance, a spreadsheet class may grant access to a cell value through "
758758"``Cell('b10').value``. Subsequent improvements to the program require the "
@@ -762,156 +762,156 @@ msgid ""
762762"descriptor:"
763763msgstr ""
764764
765- #: ../../howto/descriptor.rst:1070
765+ #: ../../howto/descriptor.rst:1084
766766msgid ""
767767"Either the built-in :func:`property` or our :func:`Property` equivalent "
768768"would work in this example."
769769msgstr ""
770770
771- #: ../../howto/descriptor.rst:1075
771+ #: ../../howto/descriptor.rst:1089
772772msgid "Functions and methods"
773773msgstr ""
774774
775- #: ../../howto/descriptor.rst:1077
775+ #: ../../howto/descriptor.rst:1091
776776msgid ""
777777"Python's object oriented features are built upon a function based "
778778"environment. Using non-data descriptors, the two are merged seamlessly."
779779msgstr ""
780780"Python のオブジェクト指向機能は、関数に基づく環境の上に構築されています。非データデスクリプタを使って、この 2 "
781781"つはシームレスに組み合わされています。"
782782
783- #: ../../howto/descriptor.rst:1080
783+ #: ../../howto/descriptor.rst:1094
784784msgid ""
785785"Functions stored in class dictionaries get turned into methods when invoked."
786786" Methods only differ from regular functions in that the object instance is "
787787"prepended to the other arguments. By convention, the instance is called "
788788"*self* but could be called *this* or any other variable name."
789789msgstr ""
790790
791- #: ../../howto/descriptor.rst:1085
791+ #: ../../howto/descriptor.rst:1099
792792msgid ""
793793"Methods can be created manually with :class:`types.MethodType` which is "
794794"roughly equivalent to:"
795795msgstr ""
796796
797- #: ../../howto/descriptor.rst:1102
797+ #: ../../howto/descriptor.rst:1116
798798msgid ""
799799"To support automatic creation of methods, functions include the "
800800":meth:`__get__` method for binding methods during attribute access. This "
801801"means that functions are non-data descriptors that return bound methods "
802802"during dotted lookup from an instance. Here's how it works:"
803803msgstr ""
804804
805- #: ../../howto/descriptor.rst:1118
805+ #: ../../howto/descriptor.rst:1132
806806msgid ""
807807"Running the following class in the interpreter shows how the function "
808808"descriptor works in practice:"
809809msgstr ""
810810
811- #: ../../howto/descriptor.rst:1127
811+ #: ../../howto/descriptor.rst:1141
812812msgid ""
813813"The function has a :term:`qualified name` attribute to support "
814814"introspection:"
815815msgstr ""
816816
817- #: ../../howto/descriptor.rst:1134
817+ #: ../../howto/descriptor.rst:1148
818818msgid ""
819819"Accessing the function through the class dictionary does not invoke "
820820":meth:`__get__`. Instead, it just returns the underlying function object::"
821821msgstr ""
822822
823- #: ../../howto/descriptor.rst:1140
823+ #: ../../howto/descriptor.rst:1154
824824msgid ""
825825"Dotted access from a class calls :meth:`__get__` which just returns the "
826826"underlying function unchanged::"
827827msgstr ""
828828
829- #: ../../howto/descriptor.rst:1146
829+ #: ../../howto/descriptor.rst:1160
830830msgid ""
831831"The interesting behavior occurs during dotted access from an instance. The "
832832"dotted lookup calls :meth:`__get__` which returns a bound method object::"
833833msgstr ""
834834
835- #: ../../howto/descriptor.rst:1153
835+ #: ../../howto/descriptor.rst:1167
836836msgid ""
837837"Internally, the bound method stores the underlying function and the bound "
838838"instance::"
839839msgstr ""
840840
841- #: ../../howto/descriptor.rst:1162
841+ #: ../../howto/descriptor.rst:1176
842842msgid ""
843843"If you have ever wondered where *self* comes from in regular methods or "
844844"where *cls* comes from in class methods, this is it!"
845845msgstr ""
846846
847- #: ../../howto/descriptor.rst:1167
847+ #: ../../howto/descriptor.rst:1181
848848msgid "Kinds of methods"
849849msgstr ""
850850
851- #: ../../howto/descriptor.rst:1169
851+ #: ../../howto/descriptor.rst:1183
852852msgid ""
853853"Non-data descriptors provide a simple mechanism for variations on the usual "
854854"patterns of binding functions into methods."
855855msgstr "非データデスクリプタは、関数をメソッドに束縛する、各種の一般的なパターンに、単純な機構を提供します。"
856856
857- #: ../../howto/descriptor.rst:1172
857+ #: ../../howto/descriptor.rst:1186
858858msgid ""
859859"To recap, functions have a :meth:`__get__` method so that they can be "
860860"converted to a method when accessed as attributes. The non-data descriptor "
861861"transforms an ``obj.f(*args)`` call into ``f(obj, *args)``. Calling "
862862"``cls.f(*args)`` becomes ``f(*args)``."
863863msgstr ""
864864
865- #: ../../howto/descriptor.rst:1177
865+ #: ../../howto/descriptor.rst:1191
866866msgid "This chart summarizes the binding and its two most useful variants:"
867867msgstr "このチャートは、束縛と、その 2 つの異なる便利な形をまとめています:"
868868
869- #: ../../howto/descriptor.rst:1180
869+ #: ../../howto/descriptor.rst:1194
870870msgid "Transformation"
871871msgstr "変換"
872872
873- #: ../../howto/descriptor.rst:1180
873+ #: ../../howto/descriptor.rst:1194
874874msgid "Called from an object"
875875msgstr ""
876876
877- #: ../../howto/descriptor.rst:1180
877+ #: ../../howto/descriptor.rst:1194
878878msgid "Called from a class"
879879msgstr ""
880880
881- #: ../../howto/descriptor.rst:1183
881+ #: ../../howto/descriptor.rst:1197
882882msgid "function"
883883msgstr "function"
884884
885- #: ../../howto/descriptor.rst:1183
885+ #: ../../howto/descriptor.rst:1197
886886msgid "f(obj, \\ *args)"
887887msgstr "f(obj, \\ *args)"
888888
889- #: ../../howto/descriptor.rst:1183 ../../howto/descriptor.rst:1185
890- #: ../../howto/descriptor.rst:1185
889+ #: ../../howto/descriptor.rst:1197 ../../howto/descriptor.rst:1199
890+ #: ../../howto/descriptor.rst:1199
891891msgid "f(\\ *args)"
892892msgstr "f(\\ *args)"
893893
894- #: ../../howto/descriptor.rst:1185
894+ #: ../../howto/descriptor.rst:1199
895895msgid "staticmethod"
896896msgstr "静的メソッド"
897897
898- #: ../../howto/descriptor.rst:1187
898+ #: ../../howto/descriptor.rst:1201
899899msgid "classmethod"
900900msgstr "クラスメソッド"
901901
902- #: ../../howto/descriptor.rst:1187
902+ #: ../../howto/descriptor.rst:1201
903903msgid "f(type(obj), \\ *args)"
904904msgstr "f(type(obj), \\ *args)"
905905
906- #: ../../howto/descriptor.rst:1187
906+ #: ../../howto/descriptor.rst:1201
907907msgid "f(cls, \\ *args)"
908908msgstr ""
909909
910- #: ../../howto/descriptor.rst:1192
910+ #: ../../howto/descriptor.rst:1206
911911msgid "Static methods"
912912msgstr ""
913913
914- #: ../../howto/descriptor.rst:1194
914+ #: ../../howto/descriptor.rst:1208
915915msgid ""
916916"Static methods return the underlying function without changes. Calling "
917917"either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into "
@@ -923,13 +923,13 @@ msgstr ""
923923"\" f\" )`` や ``object.__getattribute__(C, \" f\" )`` "
924924"を直接探索するのと同じです。結果として、関数はオブジェクトとクラスから同じようにアクセスできます。"
925925
926- #: ../../howto/descriptor.rst:1200
926+ #: ../../howto/descriptor.rst:1214
927927msgid ""
928928"Good candidates for static methods are methods that do not reference the "
929929"``self`` variable."
930930msgstr "静的メソッドにすると良いのは、 ``self`` 変数への参照を持たないメソッドです。"
931931
932- #: ../../howto/descriptor.rst:1203
932+ #: ../../howto/descriptor.rst:1217
933933msgid ""
934934"For instance, a statistics package may include a container class for "
935935"experimental data. The class provides normal methods for computing the "
@@ -945,30 +945,30 @@ msgstr ""
945945"は統計上の便利な変換ルーチンですが、特定のデータセットに直接には依存しません。これは、オブジェクトからでもクラスからでも呼び出せます: "
946946"``s.erf(1.5) --> .9332`` または ``Sample.erf(1.5) --> .9332`` 。"
947947
948- #: ../../howto/descriptor.rst:1212
948+ #: ../../howto/descriptor.rst:1226
949949msgid ""
950950"Since static methods return the underlying function with no changes, the "
951951"example calls are unexciting:"
952952msgstr ""
953953
954- #: ../../howto/descriptor.rst:1229
954+ #: ../../howto/descriptor.rst:1243
955955msgid ""
956956"Using the non-data descriptor protocol, a pure Python version of "
957957":func:`staticmethod` would look like this:"
958958msgstr ""
959959
960- #: ../../howto/descriptor.rst:1261
960+ #: ../../howto/descriptor.rst:1275
961961msgid "Class methods"
962962msgstr ""
963963
964- #: ../../howto/descriptor.rst:1263
964+ #: ../../howto/descriptor.rst:1277
965965msgid ""
966966"Unlike static methods, class methods prepend the class reference to the "
967967"argument list before calling the function. This format is the same for "
968968"whether the caller is an object or a class:"
969969msgstr ""
970970
971- #: ../../howto/descriptor.rst:1281
971+ #: ../../howto/descriptor.rst:1295
972972msgid ""
973973"This behavior is useful whenever the method only needs to have a class "
974974"reference and does not rely on data stored in a specific instance. One use "
@@ -977,61 +977,62 @@ msgid ""
977977"of keys. The pure Python equivalent is:"
978978msgstr ""
979979
980- #: ../../howto/descriptor.rst:1298
980+ #: ../../howto/descriptor.rst:1312
981981msgid "Now a new dictionary of unique keys can be constructed like this:"
982982msgstr ""
983983
984- #: ../../howto/descriptor.rst:1308
984+ #: ../../howto/descriptor.rst:1322
985985msgid ""
986986"Using the non-data descriptor protocol, a pure Python version of "
987987":func:`classmethod` would look like this:"
988988msgstr ""
989989
990- #: ../../howto/descriptor.rst:1346
990+ #: ../../howto/descriptor.rst:1371
991991msgid ""
992- "The code path for ``hasattr(obj, '__get__')`` was added in Python 3.9 and "
993- "makes it possible for :func:`classmethod` to support chained decorators. For"
994- " example, a classmethod and property could be chained together:"
992+ "The code path for ``hasattr(type(self.f), '__get__')`` was added in Python "
993+ "3.9 and makes it possible for :func:`classmethod` to support chained "
994+ "decorators. For example, a classmethod and property could be chained "
995+ "together:"
995996msgstr ""
996997
997- #: ../../howto/descriptor.rst:1365
998+ #: ../../howto/descriptor.rst:1391
998999msgid "Member objects and __slots__"
9991000msgstr ""
10001001
1001- #: ../../howto/descriptor.rst:1367
1002+ #: ../../howto/descriptor.rst:1393
10021003msgid ""
10031004"When a class defines ``__slots__``, it replaces instance dictionaries with a"
10041005" fixed-length array of slot values. From a user point of view that has "
10051006"several effects:"
10061007msgstr ""
10071008
1008- #: ../../howto/descriptor.rst:1371
1009+ #: ../../howto/descriptor.rst:1397
10091010msgid ""
10101011"1. Provides immediate detection of bugs due to misspelled attribute "
10111012"assignments. Only attribute names specified in ``__slots__`` are allowed:"
10121013msgstr ""
10131014
1014- #: ../../howto/descriptor.rst:1387
1015+ #: ../../howto/descriptor.rst:1413
10151016msgid ""
10161017"2. Helps create immutable objects where descriptors manage access to private"
10171018" attributes stored in ``__slots__``:"
10181019msgstr ""
10191020
1020- #: ../../howto/descriptor.rst:1422
1021+ #: ../../howto/descriptor.rst:1448
10211022msgid ""
10221023"3. Saves memory. On a 64-bit Linux build, an instance with two attributes "
10231024"takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight "
10241025"design pattern <https://en.wikipedia.org/wiki/Flyweight_pattern>`_ likely "
10251026"only matters when a large number of instances are going to be created."
10261027msgstr ""
10271028
1028- #: ../../howto/descriptor.rst:1427
1029+ #: ../../howto/descriptor.rst:1453
10291030msgid ""
10301031"4. Blocks tools like :func:`functools.cached_property` which require an "
10311032"instance dictionary to function correctly:"
10321033msgstr ""
10331034
1034- #: ../../howto/descriptor.rst:1449
1035+ #: ../../howto/descriptor.rst:1475
10351036msgid ""
10361037"It is not possible to create an exact drop-in pure Python version of "
10371038"``__slots__`` because it requires direct access to C structures and control "
@@ -1041,36 +1042,36 @@ msgid ""
10411042"managed by member descriptors:"
10421043msgstr ""
10431044
1044- #: ../../howto/descriptor.rst:1492
1045+ #: ../../howto/descriptor.rst:1518
10451046msgid ""
10461047"The :meth:`type.__new__` method takes care of adding member objects to class"
10471048" variables:"
10481049msgstr ""
10491050
1050- #: ../../howto/descriptor.rst:1508
1051+ #: ../../howto/descriptor.rst:1534
10511052msgid ""
10521053"The :meth:`object.__new__` method takes care of creating instances that have"
10531054" slots instead of an instance dictionary. Here is a rough simulation in "
10541055"pure Python:"
10551056msgstr ""
10561057
1057- #: ../../howto/descriptor.rst:1543
1058+ #: ../../howto/descriptor.rst:1569
10581059msgid ""
10591060"To use the simulation in a real class, just inherit from :class:`Object` and"
10601061" set the :term:`metaclass` to :class:`Type`:"
10611062msgstr ""
10621063
1063- #: ../../howto/descriptor.rst:1557
1064+ #: ../../howto/descriptor.rst:1583
10641065msgid ""
10651066"At this point, the metaclass has loaded member objects for *x* and *y*::"
10661067msgstr ""
10671068
1068- #: ../../howto/descriptor.rst:1578
1069+ #: ../../howto/descriptor.rst:1604
10691070msgid ""
10701071"When instances are created, they have a ``slot_values`` list where the "
10711072"attributes are stored:"
10721073msgstr ""
10731074
1074- #: ../../howto/descriptor.rst:1590
1075+ #: ../../howto/descriptor.rst:1616
10751076msgid "Misspelled or unassigned attributes will raise an exception:"
10761077msgstr ""
0 commit comments