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/2008-March/077968.html below:

[Python-Dev] The Breaking of distutils and PyPI for Python 3000?

[Python-Dev] The Breaking of distutils and PyPI for Python 3000? [Python-Dev] The Breaking of distutils and PyPI for Python 3000?Terry Reedy tjreedy at udel.edu
Fri Mar 21 00:17:41 CET 2008
""Martin v. Löwis"" <martin at v.loewis.de> wrote in message 
news:47E2E02F.1020007 at v.loewis.de...
| This is probably not correct. However, in 2.6, you could write
| that as
|
| if type(s) is bytes: s = unicode(s, 'utf-8')
|
| as bytes is str in 2.6. If you want to support even older
| versions, do
|
| try:
|    bytes
| except NameError:
|    bytes = str
|
| somewhere, then write the code as I proposed above.

This is exactly the sort of thing that should be and I expect will be in 
the conversion docs. 



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