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 +--------------------------------------+
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