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.

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

Reply via email to