P.J. Eby a écrit :

[...] stdlib constants are almost always ASCII, and the main use cases for ebytes would involve ascii-extended encodings.)

Then, how about a new "ascii string" literal? This would produce a special kind of string that would coerce to a normal string when mixed with a str, and to a bytes using ascii codec when mixed with a bytes. Then you could write

>>> a"/".join(base, path)

and not worry if base and path are both str, or both bytes (mixed being of course forbidden).

B.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to