@@ -16,7 +16,7 @@ msgid ""
16
16
msgstr ""
17
17
"Project-Id-Version : Python 3.9\n "
18
18
"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 "
20
20
"PO-Revision-Date : 2017-02-16 17:44+0000\n "
21
21
"Last-Translator : mollinaca, 2020\n "
22
22
"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -845,7 +845,7 @@ msgid ""
845
845
msgstr ""
846
846
847
847
#: ../../howto/descriptor.rst:1133
848
- msgid "Static methods"
848
+ msgid "Other kinds of methods"
849
849
msgstr ""
850
850
851
851
#: ../../howto/descriptor.rst:1135
@@ -907,7 +907,11 @@ msgstr "f(type(obj), \\*args)"
907
907
msgid "f(cls, \\ *args)"
908
908
msgstr ""
909
909
910
- #: ../../howto/descriptor.rst:1156
910
+ #: ../../howto/descriptor.rst:1158
911
+ msgid "Static methods"
912
+ msgstr ""
913
+
914
+ #: ../../howto/descriptor.rst:1160
911
915
msgid ""
912
916
"Static methods return the underlying function without changes. Calling "
913
917
"either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into "
@@ -919,13 +923,13 @@ msgstr ""
919
923
"\" f\" )`` や ``object.__getattribute__(C, \" f\" )`` "
920
924
"を直接探索するのと同じです。結果として、関数はオブジェクトとクラスから同じようにアクセスできます。"
921
925
922
- #: ../../howto/descriptor.rst:1162
926
+ #: ../../howto/descriptor.rst:1166
923
927
msgid ""
924
928
"Good candidates for static methods are methods that do not reference the "
925
929
"``self`` variable."
926
930
msgstr "静的メソッドにすると良いのは、 ``self`` 変数への参照を持たないメソッドです。"
927
931
928
- #: ../../howto/descriptor.rst:1165
932
+ #: ../../howto/descriptor.rst:1169
929
933
msgid ""
930
934
"For instance, a statistics package may include a container class for "
931
935
"experimental data. The class provides normal methods for computing the "
@@ -941,30 +945,30 @@ msgstr ""
941
945
"は統計上の便利な変換ルーチンですが、特定のデータセットに直接には依存しません。これは、オブジェクトからでもクラスからでも呼び出せます: "
942
946
"``s.erf(1.5) --> .9332`` または ``Sample.erf(1.5) --> .9332`` 。"
943
947
944
- #: ../../howto/descriptor.rst:1174
948
+ #: ../../howto/descriptor.rst:1178
945
949
msgid ""
946
950
"Since static methods return the underlying function with no changes, the "
947
951
"example calls are unexciting:"
948
952
msgstr ""
949
953
950
- #: ../../howto/descriptor.rst:1191
954
+ #: ../../howto/descriptor.rst:1195
951
955
msgid ""
952
956
"Using the non-data descriptor protocol, a pure Python version of "
953
957
":func:`staticmethod` would look like this:"
954
958
msgstr ""
955
959
956
- #: ../../howto/descriptor.rst:1207
960
+ #: ../../howto/descriptor.rst:1211
957
961
msgid "Class methods"
958
962
msgstr ""
959
963
960
- #: ../../howto/descriptor.rst:1209
964
+ #: ../../howto/descriptor.rst:1213
961
965
msgid ""
962
966
"Unlike static methods, class methods prepend the class reference to the "
963
967
"argument list before calling the function. This format is the same for "
964
968
"whether the caller is an object or a class:"
965
969
msgstr ""
966
970
967
- #: ../../howto/descriptor.rst:1227
971
+ #: ../../howto/descriptor.rst:1231
968
972
msgid ""
969
973
"This behavior is useful whenever the method only needs to have a class "
970
974
"reference and does not rely on data stored in a specific instance. One use "
@@ -973,61 +977,61 @@ msgid ""
973
977
"of keys. The pure Python equivalent is:"
974
978
msgstr ""
975
979
976
- #: ../../howto/descriptor.rst:1244
980
+ #: ../../howto/descriptor.rst:1248
977
981
msgid "Now a new dictionary of unique keys can be constructed like this:"
978
982
msgstr ""
979
983
980
- #: ../../howto/descriptor.rst:1254
984
+ #: ../../howto/descriptor.rst:1258
981
985
msgid ""
982
986
"Using the non-data descriptor protocol, a pure Python version of "
983
987
":func:`classmethod` would look like this:"
984
988
msgstr ""
985
989
986
- #: ../../howto/descriptor.rst:1292
990
+ #: ../../howto/descriptor.rst:1296
987
991
msgid ""
988
992
"The code path for ``hasattr(obj, '__get__')`` was added in Python 3.9 and "
989
993
"makes it possible for :func:`classmethod` to support chained decorators. For"
990
994
" example, a classmethod and property could be chained together:"
991
995
msgstr ""
992
996
993
- #: ../../howto/descriptor.rst:1311
997
+ #: ../../howto/descriptor.rst:1315
994
998
msgid "Member objects and __slots__"
995
999
msgstr ""
996
1000
997
- #: ../../howto/descriptor.rst:1313
1001
+ #: ../../howto/descriptor.rst:1317
998
1002
msgid ""
999
1003
"When a class defines ``__slots__``, it replaces instance dictionaries with a"
1000
1004
" fixed-length array of slot values. From a user point of view that has "
1001
1005
"several effects:"
1002
1006
msgstr ""
1003
1007
1004
- #: ../../howto/descriptor.rst:1317
1008
+ #: ../../howto/descriptor.rst:1321
1005
1009
msgid ""
1006
1010
"1. Provides immediate detection of bugs due to misspelled attribute "
1007
1011
"assignments. Only attribute names specified in ``__slots__`` are allowed:"
1008
1012
msgstr ""
1009
1013
1010
- #: ../../howto/descriptor.rst:1333
1014
+ #: ../../howto/descriptor.rst:1337
1011
1015
msgid ""
1012
1016
"2. Helps create immutable objects where descriptors manage access to private"
1013
1017
" attributes stored in ``__slots__``:"
1014
1018
msgstr ""
1015
1019
1016
- #: ../../howto/descriptor.rst:1368
1020
+ #: ../../howto/descriptor.rst:1372
1017
1021
msgid ""
1018
1022
"3. Saves memory. On a 64-bit Linux build, an instance with two attributes "
1019
1023
"takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight "
1020
1024
"design pattern <https://en.wikipedia.org/wiki/Flyweight_pattern>`_ likely "
1021
1025
"only matters when a large number of instances are going to be created."
1022
1026
msgstr ""
1023
1027
1024
- #: ../../howto/descriptor.rst:1373
1028
+ #: ../../howto/descriptor.rst:1377
1025
1029
msgid ""
1026
1030
"4. Blocks tools like :func:`functools.cached_property` which require an "
1027
1031
"instance dictionary to function correctly:"
1028
1032
msgstr ""
1029
1033
1030
- #: ../../howto/descriptor.rst:1395
1034
+ #: ../../howto/descriptor.rst:1399
1031
1035
msgid ""
1032
1036
"It is not possible to create an exact drop-in pure Python version of "
1033
1037
"``__slots__`` because it requires direct access to C structures and control "
@@ -1037,36 +1041,36 @@ msgid ""
1037
1041
"managed by member descriptors:"
1038
1042
msgstr ""
1039
1043
1040
- #: ../../howto/descriptor.rst:1438
1044
+ #: ../../howto/descriptor.rst:1442
1041
1045
msgid ""
1042
1046
"The :meth:`type.__new__` method takes care of adding member objects to class"
1043
1047
" variables:"
1044
1048
msgstr ""
1045
1049
1046
- #: ../../howto/descriptor.rst:1454
1050
+ #: ../../howto/descriptor.rst:1458
1047
1051
msgid ""
1048
1052
"The :meth:`object.__new__` method takes care of creating instances that have"
1049
1053
" slots instead of an instance dictionary. Here is a rough simulation in "
1050
1054
"pure Python:"
1051
1055
msgstr ""
1052
1056
1053
- #: ../../howto/descriptor.rst:1489
1057
+ #: ../../howto/descriptor.rst:1493
1054
1058
msgid ""
1055
1059
"To use the simulation in a real class, just inherit from :class:`Object` and"
1056
1060
" set the :term:`metaclass` to :class:`Type`:"
1057
1061
msgstr ""
1058
1062
1059
- #: ../../howto/descriptor.rst:1503
1063
+ #: ../../howto/descriptor.rst:1507
1060
1064
msgid ""
1061
1065
"At this point, the metaclass has loaded member objects for *x* and *y*::"
1062
1066
msgstr ""
1063
1067
1064
- #: ../../howto/descriptor.rst:1524
1068
+ #: ../../howto/descriptor.rst:1528
1065
1069
msgid ""
1066
1070
"When instances are created, they have a ``slot_values`` list where the "
1067
1071
"attributes are stored:"
1068
1072
msgstr ""
1069
1073
1070
- #: ../../howto/descriptor.rst:1536
1074
+ #: ../../howto/descriptor.rst:1540
1071
1075
msgid "Misspelled or unassigned attributes will raise an exception:"
1072
1076
msgstr ""
0 commit comments