Talin wrote:
> Other kinds of customization require replacing a much larger chunk of 
> code. Changing the "underscores" and "check-unused" behavior requires 
> overriding 'vformat', which means replacing the entire template string 
> parser. I figured that there would be a lot of people who might want 
> these features, but didn't want to rewrite all of vformat.

Actually you only have to replace get_positional or get_named, I think.

And I don't see how the "check-unused" behavior can be written in the 
base class, in the presence of get_positional and get_named.  If the 
list of identifiers isn't known to the base class (as in your example of 
NamespaceFormatter), then how can the base class know if they're all used?

>> I've started a sample implementation to test this API.  For starters,
>> I'm writing it in pure Python, but my intention is to use the code in
>> the pep3101 sandbox once I have some tests written and we're happy
>> with the API.
> 
> Cool.

I think we'll know more when I've made some more progress on this.

Eric.
_______________________________________________
Python-3000 mailing list
[email protected]
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