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/2004-August/048416.html below:

[Python-checkins] python/dist/src/Lib/test test_string.py, 1.25, 1.26

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/test test_string.py, 1.25, 1.26Greg Ewing greg at cosc.canterbury.ac.nz
Fri Aug 27 03:32:44 CEST 2004
Tim Peters <tim.peters at gmail.com>:

> > u = u"foo"
> > assert u"".join([s]) is s
> 
> Well, in that example it *has* to fail, because the input (s) wasn't a
> unicode string to begin with, but u"".join() must return a unicode
> string.

It could be argued that joining a single-element list doesn't
involve using the separator at all, so its type shouldn't matter.

It could also be argued that joining with an empty string, of
whatever flavour, is equivalent to just concatenating the list
elements with no separator, so again the type of the separator
shouldn't matter.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+
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