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/131651.html below:

[Python-Dev] PEP 461 - Adding % and {} formatting to bytes

[Python-Dev] PEP 461 - Adding % and {} formatting to bytes [Python-Dev] PEP 461 - Adding % and {} formatting to bytesEric V. Smith eric at trueblade.com
Wed Jan 15 23:14:06 CET 2014
On 1/15/2014 4:32 PM, Ethan Furman wrote:
> A question for anyone that has extensive experience in both %-formatting
> and .format-formatting:  Would it be possible, at least for int and
> float, to take whatever is in the specifier and convert to %?  Example:
> 
>   "Weight: {wgt:-07f}".format(wgt=137.23)
> 
> would take the "-07f" and basically do a "%-07f" % 137.23 to get the
> ASCII to use?

I think the int.__format__ version might be a superset. Specifically,
the "n" and "%" types. There may well be others.

But I think we could say we're not going to support these in b"".format().

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