M.-A. Lemburg wrote:
On 2008-01-10 14:31, Eric Smith wrote:
(I'm posting to python-dev, because this isn't strictly 3.0 related. Hopefully most people read it in addition to python-3000).
I'm working on backporting the changes I made for PEP 3101 (Advanced String Formatting) to the trunk, in order to meet the pre-PyCon release date for 2.6a1.
I have a few questions about how I should handle str/unicode. 3.0 was pretty easy, because everything was unicode.
Since this is a new feature, why bother with strings at all (even in 2.6) ?
Use Unicode throughout and be done with it.
I was hoping someone would say that! It would certainly make things much easier.
But for my own selfish reasons, I'd like to have str.format() work in 2.6. Other than the issues I raised here, I've already done the vast majority of the work for the code to support either string or unicode. For example, I put most of the implementation in Objects/stringlib, so I can include it either as string or unicode.
But I can live with unicode only if that's the consensus.