[Python-Dev] bytes / unicode
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Jun 28 10:28:45 CEST 2010
R. David Murray wrote:
> Having such a poly_str type would probably make my life easier.
A thought on this poly_str type: perhaps it could be
called "ascii", since that's what it would have to be
restricted to, and have
a'xxx'
as a literal syntax for it, seeing as literals seem to
be one of its main use cases.
> I also would like just vent a little frustration at having to
> use single-character-slice notation when I want to index a character
> in a string in my algorithms....
Thinking way outside the square, and probably the pale
as well, maybe @ could be pressed into service as an
infix operator, with
s at i
being equivalent to
s[i:i+1]
--
Greg
More information about the Python-Dev
mailing list