# Copyright (C) 2001-2023, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Liang-Bo Wang , 2015
# Matt Wang , 2023
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-03 00:14+0000\n"
"PO-Revision-Date: 2023-07-01 03:44+0800\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.2.2\n"
#: ../../c-api/iter.rst:6
msgid "Iterator Protocol"
msgstr ""
#: ../../c-api/iter.rst:8
msgid "There are two functions specifically for working with iterators."
msgstr ""
#: ../../c-api/iter.rst:12
msgid ""
"Return non-zero if the object *o* can be safely passed to :c:func:"
"`PyIter_Next`, and ``0`` otherwise. This function always succeeds."
msgstr ""
" *o* :c:func:`PyIter_Next` (non-zero)"
" 0"
#: ../../c-api/iter.rst:17
msgid ""
"Return non-zero if the object *o* provides the :class:`AsyncIterator` "
"protocol, and ``0`` otherwise. This function always succeeds."
msgstr ""
" *o* :class:`AsyncIterator` 0"
""
#: ../../c-api/iter.rst:24
msgid ""
"Return the next value from the iterator *o*. The object must be an iterator "
"according to :c:func:`PyIter_Check` (it is up to the caller to check this). "
"If there are no remaining values, returns ``NULL`` with no exception set. If "
"an error occurs while retrieving the item, returns ``NULL`` and passes along "
"the exception."
msgstr ""
" *o* :c:func:`PyIter_Check`"
" ``NULL`` "
" ``NULL`` "
#: ../../c-api/iter.rst:30
msgid ""
"To write a loop which iterates over an iterator, the C code should look "
"something like this::"
msgstr "C "
#: ../../c-api/iter.rst:59
msgid ""
"The enum value used to represent different results of :c:func:`PyIter_Send`."
msgstr " :c:func:`PyIter_Send` (enum) "
#: ../../c-api/iter.rst:66
msgid "Sends the *arg* value into the iterator *iter*. Returns:"
msgstr " *arg* *iter* "
#: ../../c-api/iter.rst:68
msgid ""
"``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*."
msgstr " ``PYGEN_RETURN`` *presult* "
#: ../../c-api/iter.rst:69
msgid ""
"``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*."
msgstr ""
" (yield) ``PYGEN_NEXT`` *presult* "
#: ../../c-api/iter.rst:70
msgid ""
"``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to "
"``NULL``."
msgstr " ``PYGEN_ERROR`` *presult* ``NULL``"