Teks sumber — English
Terjemahan — Bahasa Indonesia
The parameter is now positional-only.
The optional *source* parameter can be used to initialize the array in a few different ways:
Parameter opsional *source* dapat digunakan untuk menginisialisasi array dengan beberapa cara berbeda:
If it is a *string*, you must also give the *encoding* (and optionally, *errors*) parameters; :func:`bytearray` then converts the string to bytes using :meth:`str.encode`.
Jika ini adalah *string*, Anda juga harus memberikan parameter *encoding* (dan opsional, *errors*); :func:`bytearray` kemudian mengonversi string menjadi byte menggunakan :meth:`str.encode`.
Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode does not have to end in a newline anymore. Added the *optimize* parameter.
Added the *module* parameter.
Parameters
Parameter
Added the *closure* parameter.
Note that if a slash(/) appears in the parameter list of a function when invoking :func:`help`, it means that the parameters prior to the slash are positional-only. For more info, see :ref:`the FAQ entry on positional-only parameters <faq-positional-only-arguments>`.
The first parameter is now positional-only.
Added the *strict* parameter.
Added the *default* keyword-only parameter.
The following example uses the :ref:`dir_fd <dir_fd>` parameter of the :func:`os.open` function to open a file relative to a given directory::
Contoh berikut menggunakan parameter :ref:`dir_fd <dir_fd>` dari fungsi :func:`os.open` untuk membuka berkas relatif ke direktori yang diberikan::
The *opener* parameter was added.
Parameter *opener* telah ditambahkan.
The *start* parameter can be specified as a keyword argument.
Parameter *mulai* dapat ditentukan sebagai argumen kata kunci.