Teks sumber — English
Terjemahan — Bahasa Indonesia
:exc:`SyntaxError` is raised instead of :exc:`ValueError` when null bytes are encountered in *source*.
This function can also be used to execute arbitrary code objects (such as those created by :func:`compile`). In this case, pass a code object instead of a string. If the code object has been compiled with ``'exec'`` as the *mode* argument, :func:`eval`\'s return value will be ``None``.
If *base* is not an instance of :class:`int` and the *base* object has a :meth:`base.__index__ <object.__index__>` method, that method is called to obtain an integer for the base. Previous versions used :meth:`base.__int__ <object.__int__>` instead of :meth:`base.__index__ <object.__index__>`.
Jika *base* bukan turunan dari :class:`int` dan objek *base* memiliki metode :meth:`base.__index__ <object.__index__>`, metode itu dipanggil untuk mendapatkan integer untuk basis. Versi sebelumnya menggunakan <object.__int__>` alih-alih :meth: `base.__index__ <object.__index__>`.
If the system call is interrupted and the signal handler does not raise an exception, the function now retries the system call instead of raising an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
Jika panggilan sistem terganggu dan penangan sinyal tidak menimbulkan pengecualian, fungsi sekarang mencoba ulang panggilan sistem alih-alih menimbulkan pengecualian :exc:`InterruptedError` (lihat :pep:`475` untuk penjelasannya).
UTF-8 is now the default encoding, instead of the platform-dependent locale encoding (:pep:`686`).
The behavior of :func:`round` for floats can be surprising: for example, ``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is not a bug: it's a result of the fact that most decimal fractions can't be represented exactly as a float. See :ref:`tut-fp-issues` for more information.
Perilaku :func:`round` untuk pecahan *floats* bisa mengejutkan: misalnya, ``round(2.675, 2)`` memberikan ``2.67`` alih-alih yang diharapkan ``2.68``. Ini bukan bug: ini adalah hasil dari fakta bahwa sebagian besar pecahan desimal tidak dapat diwakili persis seperti pelampung *float*. Lihat :ref:`tut-fp-issues` untuk informasi lebih lanjut.