Message141363
... while it apparently shouldn't:
>>> sum([b'', b''], b'')
b''
>>> sum([b'', b''], bytearray())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: sum() can't sum bytes [use b''.join(seq) instead]
In 2.7, the situation is the reverse:
>>> sum([b'', b''], b'')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: sum() can't sum strings [use ''.join(seq) instead]
>>> sum([b'', b''], bytearray())
bytearray(b'') |
|
Date |
User |
Action |
Args |
2011-07-29 12:45:32 | pitrou | set | recipients:
+ pitrou, rhettinger, mark.dickinson |
2011-07-29 12:45:31 | pitrou | set | messageid: <1311943531.95.0.378108563398.issue12654@psf.upfronthosting.co.za> |
2011-07-29 12:45:31 | pitrou | link | issue12654 messages |
2011-07-29 12:45:31 | pitrou | create | |
|