[Python-Dev] PEP 414 (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Sun Feb 26 11🔞21 CET 2012
- Previous message: [Python-Dev] PEP 414
- Next message: [Python-Dev] PEP 414
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
26.02.12 11:05, Vinay Sajip написав(ла):
The PEP does not consider an alternative idea such as using "from future import unicodeliterals" in code which needs to run on 2.x, together with e.g. a callable n('xxx') which can be used where native strings are needed. This avoids the need to reintroduce the u'xxx' literal syntax, makes it explicit where native strings are needed, is less obtrusive that u('xxx') or u'xxx' because typically there will be vastly fewer places where you need native strings, and is unlikely to impose a major runtime penalty when compared with u('xxx') (again, because of the lower frequency of occurrence).
n = str
- Previous message: [Python-Dev] PEP 414
- Next message: [Python-Dev] PEP 414
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]