[docs] bytearray and language usage.
georg at python.org
Sun Oct 6 11:27:50 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
Am 28.06.2013 01:50, schrieb Mark Janssen:
> Looking at the Python docs for v2.7.5.
> Section 2.
> bytearray([source[, encoding[, errors]]])
> " Return a new array of bytes. The bytearray type is a mutable sequence of
> integers in the range 0 <= x < 256."
> This should not be called a "mutable sequence of integers", because to call
> them "integers" already casts raw bits into a particular *type*. They
> could, hypothetically be very short floats, for example.
> More accurately, they are merely "uninterpreted bits presented to the user
> in 8-bit chunks, with a consistent starting boundary" (held by the machine
> storage address).
the language is actually correct; Python treats bytearrays as sequences
of integers. Try this:
[97, 98, 99]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the docs