Eric Smith wrote: > Jim Jewett wrote: >> but you might want to take inspiration from the "tail" of an >> elementtree node, and return the field with the literal next to it as >> a single object. >> >> (literal_text, field_name, format_spec, conversion) > > I think I like that best.
I implemented this in r57641. I think it simplifies things. At least, it's easier to explain. Due to an optimization dealing with escaped braces, it's possible for (literal, None, None, None) to be returned more than once. I don't think that's a problem, as long as it's documented. If you look at string.py's Formatter.vformat, I don't think it complicates the implementation at all. Thanks for the suggestion. _______________________________________________ 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
