A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/130931.html below:

Add bytes % args and bytes.format(args) to Python 3.5

[Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5 [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5Xavier Morel python-dev at masklinn.net
Mon Jan 6 15:50:17 CET 2014
On 2014-01-06, at 14:44 , Antoine Pitrou <solipsis at pitrou.net> wrote:
>> Then,
>> the following points must be decided to define the complete list of
>> supported features (formatters):
>> 
>> * Format integer to hexadecimal? ``%x`` and ``%X``
>> * Format integer to octal? ``%o``
>> * Format integer to binary? ``{!b}``
>> * Alignment?
>> * Truncating? Truncate or raise an error?
> 
> Not desirable IMHO. bytes formatting should serve mainly for templating
> situations (i.e. catenate and insert bytestrings into one another). We
> cannot start giving text-like semantics to bytes objects without
> confusing non-experts.

But having at least some of struct's formatting options available on
bytes.format or bytes % would be useful.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4