[Python-ideas] A way to subscript a single integer from bytes

Elazar elazarg at gmail.com
Tue May 1 12:27:16 EDT 2018


I think this method is easy to miss, since people look at the docs for
bytes (e.g. using dir(bytes)). It might be worthwhile to either add a
`bytes.to_int(...)` method (better, IMHO), or to point to int.from_bytes on
the relevant part of the docs.

Elazar

On Tue, May 1, 2018 at 5:09 PM Ken Hilton <kenlhilton at gmail.com> wrote:

> Whoops! Never seen that before. Nothing I searched up pointed me to it.
> Sorry for wasting your time!
>
> Ken;
> --
> Sincerely,
> Ken;
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180501/ac18ccef/attachment.html>


More information about the Python-ideas mailing list