@@ -1764,6 +1764,9 @@ msgid ""
17641764":attr:`argtypes` tuple will convert a string passed as argument into a bytes"
17651765" object using ctypes conversion rules."
17661766msgstr ""
1767+ "当外部函数被调用时,每个实际参数都会被传给 :attr:`argtypes` 元组中条目的 :meth:`from_param` "
1768+ "类方法,此方法允许将实际参数适配为此外部函数所接受的对象。 例如,:attr:`argtypes` 元组中的 :class:`c_char_p` "
1769+ "条目将使用 ctypes 约定规则把作为参数传入的字符串转换为字节串对象。"
17671770
17681771#: ../../library/ctypes.rst:1577
17691772msgid ""
@@ -1772,37 +1775,39 @@ msgid ""
17721775"usable as argument (integer, string, ctypes instance). This allows defining"
17731776" adapters that can adapt custom objects as function parameters."
17741777msgstr ""
1778+ "新增:现在可以将不是 ctypes 类型的条目放入 argtypes,但每个条目都必须具有 :meth:`from_param` "
1779+ "方法用于返回可作为参数的值(整数、字符串、ctypes 实例)。 这样就允许定义可将自定义对象适配为函数形参的适配器。"
17751780
17761781#: ../../library/ctypes.rst:1584
17771782msgid ""
17781783"Assign a Python function or another callable to this attribute. The callable"
17791784" will be called with three or more arguments:"
1780- msgstr ""
1785+ msgstr "将一个 Python 函数或其他可调用对象赋值给此属性。 该可调用对象将附带三个及以上的参数被调用。 "
17811786
17821787#: ../../library/ctypes.rst:1591
17831788msgid ""
17841789"*result* is what the foreign function returns, as specified by the "
17851790":attr:`restype` attribute."
1786- msgstr ""
1791+ msgstr "*result* 是外部函数返回的结果,由 :attr:`restype` 属性指明。 "
17871792
17881793#: ../../library/ctypes.rst:1594
17891794msgid ""
17901795"*func* is the foreign function object itself, this allows reusing the same "
17911796"callable object to check or post process the results of several functions."
1792- msgstr ""
1797+ msgstr "*func* 是外部函数对象本身,这样就允许重新使用相同的可调用对象来对多个函数进行检查或后续处理。 "
17931798
17941799#: ../../library/ctypes.rst:1598
17951800msgid ""
17961801"*arguments* is a tuple containing the parameters originally passed to the "
17971802"function call, this allows specializing the behavior on the arguments used."
1798- msgstr ""
1803+ msgstr "*arguments* 是一个包含最初传递给函数调用的形参的元组,这样就允许对所用参数的行为进行特别处理。 "
17991804
18001805#: ../../library/ctypes.rst:1602
18011806msgid ""
18021807"The object that this function returns will be returned from the foreign "
18031808"function call, but it can also check the result value and raise an exception"
18041809" if the foreign function call failed."
1805- msgstr ""
1810+ msgstr "此函数所返回的对象将会由外部函数调用返回,但它还可以在外部函数调用失败时检查结果并引发异常。 "
18061811
18071812#: ../../library/ctypes.rst:1609
18081813msgid ""
0 commit comments