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().

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to