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/2002-October/029549.html below:

[Python-Dev] The -U flag

[Python-Dev] The -U flagGuido van Rossum guido@python.org
Sun, 13 Oct 2002 19:48:33 -0400
> Since Python allows Unicode strings in sys.path, we are making
> progress on getting -U to work. When entering interactive mode, the
> stumbling block is
> 
> _idmap = ''
> for i in range(256): _idmap = _idmap + chr(i)
> del i
> 
> Here, _idmap is initialized with a Unicode string, and the chr(i)
> results are promoted to Unicode, which eventually causes a
> UnicodeErorr when you get past 127.
> 
> The work-around would be to write
> 
> _idmap = str('')
> for i in range(256): _idmap = _idmap + chr(i)
> del i
> 
> With that, we can enter interactive mode in python -U.
> 
> Is such a change acceptable?

Only with a comment that explains it -- otherwise the next person
looking at the code will remove it.

But didn't we at one point conclude that -U was never gonna work?  And
wasn't that why it's no longer documented?

--Guido van Rossum (home page: http://www.python.org/~guido/)



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