[Python-3000] Looking for advice on PEP 3101 implementation details
Eric Smith
eric+python-dev at trueblade.com
Fri Aug 17 21:03:46 CEST 2007
I'm refactoring the sandbox implementation, and I need to add the code
that parses the standard format specifiers to py3k. Since strings,
ints, and floats share same format specifiers, I want to have only a
single parser.
My first question is: where should this parser code live? Should I
create a file Python/format.c, or is there a better place? Should the
.h file be Include/format.h?
I also need to have C code that is called by both str.format, and that
is also used by the Formatter implementation.
So my second question is: should I create a Module/_format.c for this
code? And why do some of these modules have leading underscores? Is it
a problem if str.format uses code in Module/_format.c? Where would the
.h file for this code go, if str.format (implemented in unicodeobject.c)
needs to get access to it?
Thanks for your help, and ongoing patience with a Python internals
newbie (but C/C++ veteran).
Eric.
PS: I realize that both of my questions have multiple parts. Sorry if
that's confusing.
More information about the Python-3000
mailing list