A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-June/101001.html below:

[Python-Dev] bytes

[Python-Dev] bytes / unicode [Python-Dev] bytes / unicodeBaptiste Carvello baptiste13z at free.fr
Thu Jun 24 18:58:59 CEST 2010
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.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4