# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-07 18:23+0000\n"
"PO-Revision-Date: 2025-09-16 00:01+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Indonesian (https://app.transifex.com/python-doc/teams/5390/"
"id/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: id\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgid ":mod:`!collections.abc` --- Abstract Base Classes for Containers"
msgstr ""

msgid "Formerly, this module was part of the :mod:`collections` module."
msgstr ""

msgid "**Source code:** :source:`Lib/_collections_abc.py`"
msgstr ""

msgid ""
"This module provides :term:`abstract base classes <abstract base class>` "
"that can be used to test whether a class provides a particular interface; "
"for example, whether it is :term:`hashable` or whether it is "
"a :term:`mapping`."
msgstr ""

msgid ""
"An :func:`issubclass` or :func:`isinstance` test for an interface works in "
"one of three ways."
msgstr ""

msgid ""
"A newly written class can inherit directly from one of the abstract base "
"classes.  The class must supply the required abstract methods.  The "
"remaining mixin methods come from inheritance and can be overridden if "
"desired.  Other methods may be added as needed:"
msgstr ""

msgid ""
"class C(Sequence):                      # Direct inheritance\n"
"    def __init__(self): ...             # Extra method not required by the "
"ABC\n"
"    def __getitem__(self, index):  ...  # Required abstract method\n"
"    def __len__(self):  ...             # Required abstract method\n"
"    def count(self, value): ...         # Optionally override a mixin method"
msgstr ""

msgid ""
">>> issubclass(C, Sequence)\n"
"True\n"
">>> isinstance(C(), Sequence)\n"
"True"
msgstr ""

msgid ""
"Existing classes and built-in classes can be registered as \"virtual "
"subclasses\" of the ABCs.  Those classes should define the full API "
"including all of the abstract methods and all of the mixin methods. This "
"lets users rely on :func:`issubclass` or :func:`isinstance` tests to "
"determine whether the full interface is supported.  The exception to this "
"rule is for methods that are automatically inferred from the rest of the API:"
msgstr ""

msgid ""
"class D:                                 # No inheritance\n"
"    def __init__(self): ...              # Extra method not required by the "
"ABC\n"
"    def __getitem__(self, index):  ...   # Abstract method\n"
"    def __len__(self):  ...              # Abstract method\n"
"    def count(self, value): ...          # Mixin method\n"
"    def index(self, value): ...          # Mixin method\n"
"\n"
"Sequence.register(D)                     # Register instead of inherit"
msgstr ""

msgid ""
">>> issubclass(D, Sequence)\n"
"True\n"
">>> isinstance(D(), Sequence)\n"
"True"
msgstr ""

msgid ""
"In this example, class :class:`!D` does not need to define ``__contains__``, "
"``__iter__``, and ``__reversed__`` because the :ref:`in-operator "
"<comparisons>`, the :term:`iteration <iterable>` logic, and "
"the :func:`reversed` function automatically fall back to using "
"``__getitem__`` and ``__len__``."
msgstr ""

msgid ""
"Some simple interfaces are directly recognizable by the presence of the "
"required methods (unless those methods have been set to :const:`None`):"
msgstr ""

msgid ""
"class E:\n"
"    def __iter__(self): ...\n"
"    def __next__(self): ..."
msgstr ""

msgid ""
">>> issubclass(E, Iterable)\n"
"True\n"
">>> isinstance(E(), Iterable)\n"
"True"
msgstr ""

msgid ""
"Complex interfaces do not support this last technique because an interface "
"is more than just the presence of method names.  Interfaces specify "
"semantics and relationships between methods that cannot be inferred solely "
"from the presence of specific method names.  For example, knowing that a "
"class supplies ``__getitem__``, ``__len__``, and ``__iter__`` is "
"insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`."
msgstr ""

msgid ""
"These abstract classes now support ``[]``. See :ref:`types-genericalias` "
"and :pep:`585`."
msgstr ""

msgid "Collections Abstract Base Classes"
msgstr ""

msgid ""
"The collections module offers the following :term:`ABCs <abstract base "
"class>`, where the \"Abstract Methods\" column lists all required abstract "
"methods, including those inherited from parent classes:"
msgstr ""

msgid "ABC"
msgstr "ABC"

msgid "Inherits from"
msgstr ""

msgid "Abstract Methods"
msgstr ""

msgid "Mixin Methods"
msgstr ""

msgid ":class:`Container` [1]_"
msgstr ""

msgid "``__contains__``"
msgstr "``__contains__``"

msgid ":class:`Hashable` [1]_"
msgstr ""

msgid "``__hash__``"
msgstr "``__hash__``"

msgid ":class:`Iterable` [1]_ [2]_"
msgstr ""

msgid "``__iter__``"
msgstr "``__iter__``"

msgid ":class:`Iterator` [1]_"
msgstr ""

msgid ":class:`Iterable`"
msgstr ":class:`Iterable`"

msgid "``__next__``"
msgstr "``__next__``"

msgid ":class:`Reversible` [1]_"
msgstr ""

msgid "``__iter__``, ``__reversed__``"
msgstr ""

msgid ":class:`Generator`  [1]_"
msgstr ""

msgid ":class:`Iterator`"
msgstr ":class:`Iterator`"

msgid "``send``, ``throw``"
msgstr "``send``, ``throw``"

msgid "``close``, ``__iter__``, ``__next__``"
msgstr "``close``, ``__iter__``, ``__next__``"

msgid ":class:`Sized`  [1]_"
msgstr ""

msgid "``__len__``"
msgstr "``__len__``"

msgid ":class:`Callable`  [1]_"
msgstr ""

msgid "``__call__``"
msgstr "``__call__``"

msgid ":class:`Collection`  [1]_"
msgstr ""

msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`"
msgstr ""

msgid "``__contains__``, ``__iter__``, ``__len__``"
msgstr "``__contains__``, ``__iter__``, ``__len__``"

msgid ":class:`Sequence`"
msgstr ":class:`Sequence`"

msgid ":class:`Reversible`, :class:`Collection`"
msgstr ":class:`Reversible`, :class:`Collection`"

msgid "``__getitem__``, ``__len__``"
msgstr "``__getitem__``, ``__len__``"

msgid ""
"``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``"
msgstr ""
"``__contains__``, ``__iter__``, ``__reversed__``, ``index``, dan ``count``"

msgid ":class:`MutableSequence`"
msgstr ":class:`MutableSequence`"

msgid ""
"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``"
msgstr ""
"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``"

msgid ""
"Inherited :class:`Sequence` methods and ``append``, ``clear``, ``reverse``, "
"``extend``, ``pop``, ``remove``, and ``__iadd__``"
msgstr ""

msgid ":class:`ByteString`"
msgstr ":class:`ByteString`"

msgid "Inherited :class:`Sequence` methods"
msgstr ""

msgid ":class:`Set`"
msgstr ":class:`Set`"

msgid ":class:`Collection`"
msgstr ":class:`Collection`"

msgid ""
"``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, "
"``__and__``, ``__or__``, ``__sub__``, ``__rsub__``, ``__xor__``, "
"``__rxor__`` and ``isdisjoint``"
msgstr ""

msgid ":class:`MutableSet`"
msgstr ":class:`MutableSet`"

msgid "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``"
msgstr "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``"

msgid ""
"Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, "
"``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``"
msgstr ""

msgid ":class:`Mapping`"
msgstr ":class:`Mapping`"

msgid "``__getitem__``, ``__iter__``, ``__len__``"
msgstr "``__getitem__``, ``__iter__``, ``__len__``"

msgid ""
"``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and "
"``__ne__``"
msgstr ""
"``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, dan "
"``__ne__``"

msgid ":class:`MutableMapping`"
msgstr ":class:`MutableMapping`"

msgid ""
"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``"
msgstr ""
"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``"

msgid ""
"Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, "
"``update``, and ``setdefault``"
msgstr ""

msgid ":class:`MappingView`"
msgstr ":class:`MappingView`"

msgid ":class:`Sized`"
msgstr ":class:`Sized`"

msgid "``__init__``, ``__len__`` and ``__repr__``"
msgstr ""

msgid ":class:`ItemsView`"
msgstr ":class:`ItemsView`"

msgid ":class:`MappingView`, :class:`Set`"
msgstr ":class:`MappingView`, :class:`Set`"

msgid "``__contains__``, ``__iter__``"
msgstr "``__contains__``, ``__iter__``"

msgid ":class:`KeysView`"
msgstr ":class:`KeysView`"

msgid ":class:`ValuesView`"
msgstr ":class:`ValuesView`"

msgid ":class:`MappingView`, :class:`Collection`"
msgstr ":class:`MappingView`, :class:`Collection`"

msgid ":class:`Awaitable` [1]_"
msgstr ""

msgid "``__await__``"
msgstr "``__await__``"

msgid ":class:`Coroutine` [1]_"
msgstr ""

msgid ":class:`Awaitable`"
msgstr ":class:`Awaitable`"

msgid "``__await__``, ``send``, ``throw``"
msgstr ""

msgid "``close``"
msgstr "``close``"

msgid ":class:`AsyncIterable` [1]_"
msgstr ""

msgid "``__aiter__``"
msgstr "``__aiter__``"

msgid ":class:`AsyncIterator` [1]_"
msgstr ""

msgid ":class:`AsyncIterable`"
msgstr ":class:`AsyncIterable`"

msgid "``__anext__``"
msgstr "``__anext__``"

msgid ":class:`AsyncGenerator` [1]_"
msgstr ""

msgid ":class:`AsyncIterator`"
msgstr ":class:`AsyncIterator`"

msgid "``asend``, ``athrow``"
msgstr "``asend``, ``athrow``"

msgid "``aclose``, ``__aiter__``, ``__anext__``"
msgstr "``aclose``, ``__aiter__``, ``__anext__``"

msgid ":class:`Buffer` [1]_"
msgstr ""

msgid "``__buffer__``"
msgstr ""

msgid "Footnotes"
msgstr "Catatan kaki"

msgid ""
"These ABCs override :meth:`~abc.ABCMeta.__subclasshook__` to support testing "
"an interface by verifying the required methods are present and have not been "
"set to :const:`None`.  This only works for simple interfaces.  More complex "
"interfaces require registration or direct subclassing."
msgstr ""

msgid ""
"Checking ``isinstance(obj, Iterable)`` detects classes that are registered "
"as :class:`Iterable` or that have an :meth:`~container.__iter__` method, but "
"it does not detect classes that iterate with the :meth:`~object.__getitem__` "
"method.  The only reliable way to determine whether an object "
"is :term:`iterable` is to call ``iter(obj)``."
msgstr ""

msgid "Collections Abstract Base Classes -- Detailed Descriptions"
msgstr ""

msgid "ABC for classes that provide the :meth:`~object.__contains__` method."
msgstr ""

msgid "ABC for classes that provide the :meth:`~object.__hash__` method."
msgstr ""

msgid "ABC for classes that provide the :meth:`~object.__len__` method."
msgstr ""

msgid "ABC for classes that provide the :meth:`~object.__call__` method."
msgstr ""

msgid ""
"See :ref:`annotating-callables` for details on how to use :class:`!Callable` "
"in type annotations."
msgstr ""

msgid "ABC for classes that provide the :meth:`~container.__iter__` method."
msgstr ""

msgid ""
"Checking ``isinstance(obj, Iterable)`` detects classes that are registered "
"as :class:`Iterable` or that have an :meth:`~container.__iter__` method, but "
"it does not detect classes that iterate with the :meth:`~object.__getitem__` "
"method. The only reliable way to determine whether an object "
"is :term:`iterable` is to call ``iter(obj)``."
msgstr ""

msgid "ABC for sized iterable container classes."
msgstr ""

msgid ""
"ABC for classes that provide the :meth:`~iterator.__iter__` "
"and :meth:`~iterator.__next__` methods.  See also the definition "
"of :term:`iterator`."
msgstr ""

msgid ""
"ABC for iterable classes that also provide the :meth:`~object.__reversed__` "
"method."
msgstr ""

msgid ""
"ABC for :term:`generator` classes that implement the protocol defined "
"in :pep:`342` that extends :term:`iterators <iterator>` with "
"the :meth:`~generator.send`, :meth:`~generator.throw` "
"and :meth:`~generator.close` methods."
msgstr ""

msgid ""
"See :ref:`annotating-generators-and-coroutines` for details on "
"using :class:`!Generator` in type annotations."
msgstr ""

msgid "ABCs for read-only and mutable :term:`sequences <sequence>`."
msgstr ""

msgid ""
"Implementation note: Some of the mixin methods, such "
"as :meth:`~container.__iter__`, :meth:`~object.__reversed__`, "
"and :meth:`~sequence.index` make repeated calls to the "
"underlying :meth:`~object.__getitem__` method. Consequently, "
"if :meth:`~object.__getitem__` is implemented with constant access speed, "
"the mixin methods will have linear performance; however, if the underlying "
"method is linear (as it would be with a linked list), the mixins will have "
"quadratic performance and will likely need to be overridden."
msgstr ""

msgid "Return first index of *value*."
msgstr ""

msgid "Raises :exc:`ValueError` if the value is not present."
msgstr ""

msgid ""
"Supporting the *start* and *stop* arguments is optional, but recommended."
msgstr ""

msgid ""
"The :meth:`~sequence.index` method gained support for the *stop* and *start* "
"arguments."
msgstr ""

msgid "The :class:`ByteString` ABC has been deprecated."
msgstr ""

msgid ""
"Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` "
"implements the :ref:`buffer protocol <bufferobjects>` at runtime. For use in "
"type annotations, either use :class:`Buffer` or a union that explicitly "
"specifies the types your code supports (e.g., ``bytes | bytearray | "
"memoryview``)."
msgstr ""

msgid ""
":class:`!ByteString` was originally intended to be an abstract class that "
"would serve as a supertype of both :class:`bytes` and :class:`bytearray`. "
"However, since the ABC never had any methods, knowing that an object was an "
"instance of :class:`!ByteString` never actually told you anything useful "
"about the object. Other common buffer types such as :class:`memoryview` were "
"also never understood as subtypes of :class:`!ByteString` (either at runtime "
"or by static type checkers)."
msgstr ""

msgid "See :pep:`PEP 688 <688#current-options>` for more details."
msgstr ""

msgid "ABCs for read-only and mutable :ref:`sets <types-set>`."
msgstr ""

msgid "ABCs for read-only and mutable :term:`mappings <mapping>`."
msgstr ""

msgid ""
"ABCs for mapping, items, keys, and values :term:`views <dictionary view>`."
msgstr ""

msgid ""
"ABC for :term:`awaitable` objects, which can be used in :keyword:`await` "
"expressions.  Custom implementations must provide "
"the :meth:`~object.__await__` method."
msgstr ""

msgid ""
":term:`Coroutine <coroutine>` objects and instances of "
"the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC."
msgstr ""

msgid ""
"In CPython, generator-based coroutines (:term:`generators <generator>` "
"decorated with :deco:`types.coroutine`) are *awaitables*, even though they "
"do not have an :meth:`~object.__await__` method. Using ``isinstance(gencoro, "
"Awaitable)`` for them will return ``False``. Use :func:`inspect.isawaitable` "
"to detect them."
msgstr ""

msgid ""
"ABC for :term:`coroutine` compatible classes.  These implement the following "
"methods, defined in :ref:`coroutine-"
"objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, "
"and :meth:`~coroutine.close`.  Custom implementations must also "
"implement :meth:`~object.__await__`.  All :class:`Coroutine` instances are "
"also instances of :class:`Awaitable`."
msgstr ""

msgid ""
"In CPython, generator-based coroutines (:term:`generators <generator>` "
"decorated with :deco:`types.coroutine`) are *awaitables*, even though they "
"do not have an :meth:`~object.__await__` method. Using ``isinstance(gencoro, "
"Coroutine)`` for them will return ``False``. Use :func:`inspect.isawaitable` "
"to detect them."
msgstr ""

msgid ""
"See :ref:`annotating-generators-and-coroutines` for details on "
"using :class:`!Coroutine` in type annotations. The variance and order of "
"type parameters correspond to those of :class:`Generator`."
msgstr ""

msgid ""
"ABC for classes that provide an ``__aiter__`` method.  See also the "
"definition of :term:`asynchronous iterable`."
msgstr ""

msgid ""
"ABC for classes that provide ``__aiter__`` and ``__anext__`` methods.  See "
"also the definition of :term:`asynchronous iterator`."
msgstr ""

msgid ""
"ABC for :term:`asynchronous generator` classes that implement the protocol "
"defined in :pep:`525` and :pep:`492`."
msgstr ""

msgid ""
"See :ref:`annotating-generators-and-coroutines` for details on "
"using :class:`!AsyncGenerator` in type annotations."
msgstr ""

msgid ""
"ABC for classes that provide the :meth:`~object.__buffer__` method, "
"implementing the :ref:`buffer protocol <bufferobjects>`. See :pep:`688`."
msgstr ""

msgid "Examples and Recipes"
msgstr ""

msgid ""
"ABCs allow us to ask classes or instances if they provide particular "
"functionality, for example::"
msgstr ""

msgid ""
"size = None\n"
"if isinstance(myvar, collections.abc.Sized):\n"
"    size = len(myvar)"
msgstr ""

msgid ""
"Several of the ABCs are also useful as mixins that make it easier to develop "
"classes supporting container APIs.  For example, to write a class supporting "
"the full :class:`Set` API, it is only necessary to supply the three "
"underlying abstract "
"methods: :meth:`~object.__contains__`, :meth:`~container.__iter__`, "
"and :meth:`~object.__len__`. The ABC supplies the remaining methods such "
"as :meth:`!__and__` and :meth:`~frozenset.isdisjoint`::"
msgstr ""

msgid ""
"class ListBasedSet(collections.abc.Set):\n"
"    ''' Alternate set implementation favoring space over speed\n"
"        and not requiring the set elements to be hashable. '''\n"
"    def __init__(self, iterable):\n"
"        self.elements = lst = []\n"
"        for value in iterable:\n"
"            if value not in lst:\n"
"                lst.append(value)\n"
"\n"
"    def __iter__(self):\n"
"        return iter(self.elements)\n"
"\n"
"    def __contains__(self, value):\n"
"        return value in self.elements\n"
"\n"
"    def __len__(self):\n"
"        return len(self.elements)\n"
"\n"
"s1 = ListBasedSet('abcdef')\n"
"s2 = ListBasedSet('defghi')\n"
"overlap = s1 & s2            # The __and__() method is supported "
"automatically"
msgstr ""

msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:"
msgstr ""

msgid ""
"Since some set operations create new sets, the default mixin methods need a "
"way to create new instances from an :term:`iterable`. The class constructor "
"is assumed to have a signature in the form ``ClassName(iterable)``. That "
"assumption is factored-out to an internal :class:`classmethod` "
"called :meth:`!_from_iterable` which calls ``cls(iterable)`` to produce a "
"new set. If the :class:`Set` mixin is being used in a class with a different "
"constructor signature, you will need to override :meth:`!_from_iterable` "
"with a classmethod or regular method that can construct new instances from "
"an iterable argument."
msgstr ""

msgid ""
"To override the comparisons (presumably for speed, as the semantics are "
"fixed), redefine :meth:`~object.__le__` and :meth:`~object.__ge__`, then the "
"other operations will automatically follow suit."
msgstr ""

msgid ""
"The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash "
"value for the set; however, :meth:`~object.__hash__` is not defined because "
"not all sets are :term:`hashable` or immutable.  To add set hashability "
"using mixins, inherit from both :class:`Set` and :class:`Hashable`, then "
"define ``__hash__ = Set._hash``."
msgstr ""

msgid ""
"`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ for an "
"example built on :class:`MutableSet`."
msgstr ""

msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`."
msgstr ""
