Pelokalan
Python ID
id en
Masuk
Proyek
builtins__functions.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
Return an :term:`asynchronous iterator` for an :term:`asynchronous iterable`. Equivalent to calling ``x.__aiter__()``.
Return ``True`` if all elements of the *iterable* are true (or if the iterable is empty). Equivalent to::
Kembalikan ``True`` jika semua elemen dari *iterable* bernilai benar (atau jika *iterable* kosong). Setara dengan::
Return ``True`` if any element of the *iterable* is true. If the iterable is empty, return ``False``. Equivalent to::
Kembalikan ``True`` jika ada elemen dari *iterable* bernilai benar. Jika *iterable* kosong, kembalikan ``False``. Setara dengan::
This is a relative of :func:`setattr`. The arguments are an object and a string. The string must be the name of one of the object's attributes. The function deletes the named attribute, provided the object allows it. For example, ``delattr(x, 'foobar')`` is equivalent to ``del x.foobar``. *name* need not be a Python identifier (see :func:`setattr`).
Equivalent to::
Setara dengan::
Note that ``filter(function, iterable)`` is equivalent to the generator expression ``(item for item in iterable if function(item))`` if function is not ``None`` and ``(item for item in iterable if item)`` if function is ``None``.
Perhatikan bahwa ``filter(function, iterable)`` setara dengan ekspresi generator ``(item for item in iterable if function(item))`` jika *function* tidak ``None`` dan ``(item for item in iterable if item)`` if *function* adalah ``None``.
Return the value of the named attribute of *object*. *name* must be a string. If the string is the name of one of the object's attributes, the result is the value of that attribute. For example, ``getattr(x, 'foobar')`` is equivalent to ``x.foobar``. If the named attribute does not exist, *default* is returned if provided, otherwise :exc:`AttributeError` is raised. *name* need not be a Python identifier (see :func:`setattr`).
Calling ``locals()`` as part of a comprehension in a function, generator, or coroutine is equivalent to calling it in the containing scope, except that the comprehension's initialised iteration variables will be included. In other scopes, it behaves as if the comprehension were running as a nested function.
Calling ``locals()`` as part of a generator expression is equivalent to calling it in a nested generator function.
Return *base* to the power *exp*; if *mod* is present, return *base* to the power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % mod``). The two-argument form ``pow(base, exp)`` is equivalent to using the power operator: ``base**exp``.
Kembalikan *base* ke *power* *exp*; jika *mod* ada, kembalikan *base* ke *power* *exp*, *modulo* *mod* (dihitung lebih efisien daripada ``pow(base, exp) % mod``). Bentuk dua argumen ``pow(base, exp)`` setara dengan menggunakan operator *power*: ``base**exp``.
This code is exactly equivalent to the first example. Be sure to give the additional functions the same name as the original property (``x`` in this case.)
Kode ini persis sama dengan contoh pertama. Pastikan untuk memberi fungsi tambahan nama yang sama dengan properti asli (``x`` dalam kasus ini.)
This is the counterpart of :func:`getattr`. The arguments are an object, a string, and an arbitrary value. The string may name an existing attribute or a new attribute. The function assigns the value to the attribute, provided the object allows it. For example, ``setattr(x, 'foobar', 123)`` is equivalent to ``x.foobar = 123``.