%a format

John Roth newsgroups at jhrothjr.com
Tue Sep 7 22:15:47 EDT 2004


"Tor Iver Wilhelmsen" <tor.iver.wilhelmsen at broadpark.no> wrote in message 
news:usm9tx5n3.fsf at broadpark.no...
> John Lenton <john at grulic.org.ar> writes:
>
>> Is there any reason python's printf-style formatting is missing the
>> (C99) '%a' specifier?
>
> Because it's not very well known or used? A google for "C printf
> format string" gave lots of resources, none of which had %a.
>
> Java's JDK 1.5 java.util.Formatter class supports it, though.

I suspect there's no major reason more significant than that
no one has written the patch to support it. That might suggest
that no one really cares enough to do so - IIRC, Python
shifted from using the C library printf() function to its own
code some time ago, so there's no real commitment to
following the C standard in this instance.

If the OP wants it, I would  suggest that he write the patch
(complete with the doc changes, etc.) and submit it.  It might
be a good idea to provide a use case more significant than
"it's in the C99 standard" as well - but then I'm not
channeling the core developers that well these days.

John Roth 





More information about the Python-list mailing list