>>>>> "DA" == David Ascher <da at ski.org> writes: DA> On Fri, 11 Jun 1999, Barry A. Warsaw wrote: >> IMO, builtin join ought to str()ify all the elements in the >> sequence, concatenating the results. That seems an intuitive >> interpretation of 'join'ing a sequence. Here's my Python >> prototype: DA> I don't get it -- why? DA> I'd expect join(((1,2,3), (4,5,6))) to yield (1,2,3,4,5,6), DA> not anything involving strings. Oh, just because I think it might useful, and would provide something that isn't easily provided with other constructs. Without those semantics join(((1,2,3), (4,5,6))) isn't much different than (1,2,3) + (4,5,6), or reduce(operator.add, ((1,2,3), (4,5,6))) as you point out. Since those latter two are easy enough to come up with, but str()ing the elements would require painful lambdas, I figured make the new built in do something new. -Barry
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