changeset: 76896:e0dcd732055f branch: 3.2 parent: 76887:04e7264e8fcf user: Sandro Tosi date: Sun May 13 11:01:20 2012 +0200 files: Doc/library/stdtypes.rst description: Issue #14793: fix grammar in bytes object paragraph; patch by Tshepang Lekhonkhobe diff -r 04e7264e8fcf -r e0dcd732055f Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst Sat May 12 23:29:32 2012 +0200 +++ b/Doc/library/stdtypes.rst Sun May 13 11:01:20 2012 +0200 @@ -819,7 +819,8 @@ also string-specific methods described in the :ref:`string-methods` section. Bytes and bytearray objects contain single bytes -- the former is immutable -while the latter is a mutable sequence. Bytes objects can be constructed the +while the latter is a mutable sequence. +Bytes objects can be constructed by using the constructor, :func:`bytes`, and from literals; use a ``b`` prefix with normal string syntax: ``b'xyzzy'``. To construct byte arrays, use the :func:`bytearray` function.

AltStyle によって変換されたページ (->オリジナル) /