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
Built-in functions
Built-in Functions
Fungsi Bawaan
For other containers see the built-in :class:`frozendict`, :class:`list`, :class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module.
The *source* argument is parsed and evaluated as a Python expression (technically speaking, an :ref:`expression list <exprlists>`) using the *globals* and *locals* mappings as global and local namespace. If the *globals* dictionary is present and does not contain a value for the key ``__builtins__``, a reference to the dictionary of the built-in module :mod:`builtins` is inserted under that key before *source* is parsed. Overriding ``__builtins__`` can be used to restrict or change the available names, but this is **not** a security mechanism: the executed code can still access all builtins. If the *locals* mapping is omitted it defaults to the *globals* dictionary. If both mappings are omitted, the source is executed with the *globals* and *locals* in the environment where :func:`eval` is called. Note, *eval()* will only have access to the :term:`nested scopes <nested scope>` (non-locals) in the enclosing environment if they are already referenced in the scope that is calling :func:`eval` (e.g. via a :keyword:`nonlocal` statement).
If the *globals* dictionary does not contain a value for the key ``__builtins__``, a reference to the dictionary of the built-in module :mod:`builtins` is inserted under that key. Overriding ``__builtins__`` can be used to restrict or change the available names, but this is **not** a security mechanism: the executed code can still access all builtins.
The built-in functions :func:`globals` and :func:`locals` return the current global and local namespace, respectively, which may be useful to pass around for use as the second and third argument to :func:`exec`.
Convert a *value* to a "formatted" representation, as controlled by *format_spec*. The interpretation of *format_spec* will depend on the type of the *value* argument; however, there is a standard formatting syntax that is used by most built-in types: :ref:`formatspec`.
Create a new frozen dictionary. The :class:`frozendict` object is a built-in class. See also :ref:`typesmapping` for documentation about this class.
For other containers see the built-in :class:`dict`, :class:`list`, :class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module.
Return a new :class:`frozenset` object, optionally with elements taken from *iterable*. :class:`frozenset` is a built-in class. See also :ref:`types-set` for documentation about this class.
For other containers see the built-in :class:`set`, :class:`list`, :class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module.
Untuk wadah *containers* lain lihat kelas-kelas bawaan :class:`set`, :class:`list`,: :class:`tuple`, dan :class:`dict`, serta modul :mod:`collections`.
Invoke the built-in help system. (This function is intended for interactive use.) If no argument is given, the interactive help system starts on the interpreter console. If the argument is a string, then the string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console. If the argument is any other kind of object, a help page on the object is generated.
Meminta sistem bantuan bawaan. (Fungsi ini dimaksudkan untuk penggunaan interaktif.) Jika tidak ada argumen yang diberikan, sistem bantuan interaktif dimulai pada konsol interpreter. Jika argumennya adalah string, maka string tersebut dicari sebagai nama modul, fungsi, kelas, metode, kata kunci, atau topik dokumentasi, dan halaman bantuan dicetak pada konsol. Jika argumennya adalah objek jenis apa pun, halaman bantuan tentang objek tersebut dihasilkan.
This function is added to the built-in namespace by the :mod:`site` module.
Fungsi ini ditambahkan ke *namespace* bawaan dengan modul :mod:`site`.
For the built-in types supporting :func:`round`, values are rounded to the closest multiple of 10 to the power minus *ndigits*; if two multiples are equally close, rounding is done toward the even choice (so, for example, both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is ``2``). Any integer value is valid for *ndigits* (positive, zero, or negative). The return value is an integer if *ndigits* is omitted or ``None``. Otherwise, the return value has the same type as *number*.
Return a new :class:`set` object, optionally with elements taken from *iterable*. :class:`set` is a built-in class. See also :ref:`types-set` for documentation about this class.
For other containers see the built-in :class:`frozenset`, :class:`list`, :class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module.
Untuk wadah *containers* lain lihat kelas-kelas bawaan :class:`frozenset`, :class:`list`, :class:`tuple`, dan :class:`dict`, juga modul :mod:`collections`.
The built-in :func:`sorted` function is guaranteed to be stable. A sort is stable if it guarantees not to change the relative order of elements that compare equal --- this is helpful for sorting in multiple passes (for example, sort by department, then by salary grade).
Fungsi bawaan :func:`sorted` dijamin stabil. Semacam stabil jika menjamin tidak mengubah urutan relatif elemen yang membandingkan kesamaan --- ini berguna untuk menyortir dalam beberapa langkah (misalnya, urutkan berdasarkan departemen, lalu dengan tingkat gaji).
``str`` is the built-in string :term:`class`. For general information about strings, see :ref:`textseq`.
``str`` adalah string bawaan :term:`class`. Untuk informasi umum tentang string, lihat :ref:`textseq`.
The :func:`isinstance` built-in function is recommended for testing the type of an object, because it takes subclasses into account.
Fungsi bawaan :func:`isinstance` direkomendasikan untuk menguji jenis objek, karena ia memperhitungkan subkelas.
built-in function
fungsi bawaan
format() (built-in function)
open() built-in function
str() (built-in function)