[Python-Dev] readd u'' literal support in 3.3?

Michael Foord fuzzyman at voidspace.org.uk
Fri Dec 9 16:35:05 CET 2011


On 9 Dec 2011, at 15:13, Barry Warsaw wrote:

> On Dec 09, 2011, at 09:20 AM, Martin v. Löwis wrote:
> 
>> One use case (and the only one I'm aware of) is to pass keyword
>> parameters. Python 2 insists that they are str (and doesn't accept
>> unicode), Python 3 insists that they are str (and doesn't accept bytes).
>> 
>> This is fairly uncommon as a problem, though, and is also solved in
>> Python 2.6, which does accept Unicode strings as keyword parameter
>> names.
> 
> Oh, I remember this one, because I think I reported and fixed it.  But I take
> it as a given that Python 2.6 is the minimal (sane) version to target for
> one-codebase cross-Python code.
> 

In mock (at least 5000 lines of code including tests) I target 2.4 -> 3.2+. Admittedly mock does little I/O but does some fairly crazy introspection (and even found bugs in Python 3 because of it).

The exception handling is the worst - no compatible syntax between 2.4-5 and Python 3. So you have to use sys.exc_info. Other than that it isn't too hard / bad.

All the best,

Michael

> -Barry
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


--
www.voidspace.org.uk/


May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing 
www.sqlite.org/different.html







More information about the Python-Dev mailing list
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.