[Python-Dev] from future import unicode_strings? (original) (raw)
Neil Schemenauer nas at arctrix.com
Thu Feb 16 01:36:35 CET 2006
- Previous message: [Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?]
- Next message: [Python-Dev] from __future__ import unicode_strings?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm in the process of summarizing the dicussion on the bytes object and an idea just occured to me. Imagine that I want to write code that deals with strings and I want to be maximally compatible with P3k. It would be nice if I could add:
from __future__ import unicode_strings
and have string literals without a 'u' prefix become unicode instances. I'm not sure how tricky the implementation would be but it seems like a useful feature.
An even crazier idea is to have that import change 'str' to be an alias for 'unicode'.
Neil
- Previous message: [Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?]
- Next message: [Python-Dev] from __future__ import unicode_strings?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]