commit | 19fe14e76ac3619e633b10c0e31effc2dad3c543 | [log] [tgz] |
---|---|---|
author | Tim Peters <tim.peters@gmail.com> | Fri Jan 19 03:03:47 2001 +0000 |
committer | Tim Peters <tim.peters@gmail.com> | Fri Jan 19 03:03:47 2001 +0000 |
tree | 9a6355f1a18463a771ea59d8882ac20cbf30d296 | |
parent | e3d6e41d81427a8e2bdda9bf3994c2c0c00c19a6 [diff] |
Derivative of patch #102549, "simpler, faster(!) implementation of string.join". Also fixes two long-standing bugs (present in 2.0): 1. .join() didn't check that the result size fit in an int. 2. string.join(s) when len(s)==1 returned s[0] regardless of s[0]'s type; e.g., "".join([3]) returned 3 (overly optimistic optimization). I resisted a keen temptation to make .join() apply str() automagically.