On Wed, Mar 31, 2010 at 08:26:57AM -0700, Mike Orr wrote: > On Wed, Mar 31, 2010 at 6:45 AM, Marius Gedminas <[email protected]> wrote: > > I was left wondering about one thing: what would this print: > > > > >>> format_byte_size(1, full_name=True) > > > > '1.0 bytes'? > > Actually it prints '1 bytes'. > > I tried to add a singular case but it made the functions significantly > more complex for an excedingly rare case. It's almost easier to > substitute the whole output. Actually, I guess that would be doable.
I'm not sure the added complexity would be worth it (plus it probably wouldn't handle i18n). I just noticed the emphasis on supplying the plural form of the unit to format_data_size while reading the docs, and wondered if that implied it would be trying to guess the singular or not. I think it would be worth mentioning directly in the documentation. Marius Gedminas -- 99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again... 101 little bugs in the code....
signature.asc
Description: Digital signature
