Python 3.x and bytes

Ian Kelly ian.g.kelly at gmail.com
Tue May 17 16:51:31 EDT 2011


On Tue, May 17, 2011 at 1:50 PM, Corey Richardson <kb1pkl at aim.com> wrote:
> - From help(bytes):
>  |  bytes(iterable_of_ints) -> bytes
>  |  bytes(string, encoding[, errors]) -> bytes
>  |  bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
>  |  bytes(memory_view) -> bytes
>
> Looks like you're using the fourth when you want the first, possibly?

Nope, he's using the fifth form, bytes(int), which is listed in the
PEP but not in the help.



More information about the Python-list mailing list