Curious Omission In New-Style Formats

Gregory Ewing greg.ewing at canterbury.ac.nz
Mon Jul 11 19:47:44 EDT 2016


Ethan Furman wrote:
> I will readily admit to not having a maths degree, and so of course to 
> me saying the integer 123 has a precision of 5, 10, or 99 digits seems 
> like hogwash to me.

Seems to me insisting that the number after the dot be
called "precision" in all cases is imposing a foolish
consistency.

There's a third thing that %-formats use it for as well:
for a string it means the maximum number of characters
to include.

To my way of thinking, the format string just lets you
specify uop to two numbers, the interpratation or wnich
is up to toe format concerned.

-- 
Greg



More information about the Python-list mailing list