[issue8662] bytes join cannot join bytes

2010-05-08 Thread Timothy Pederick
Timothy Pederick added the comment: Brett: Well, I was more thinking along the lines of making join() recognise when it's been passed a bytes object, rather than changing the semantics of indexing bytes. That would be a bit overdramatic! But if it's wontfix, it's wontfix. Antoine: Yes, the s

[issue8662] bytes join cannot join bytes

2010-05-08 Thread Brett Cannon
Brett Cannon added the comment: While the bytes-returning-int semantics might be annoying in this case, but as you point out, Timothy, it's too late to change this. -- nosy: +brett.cannon resolution: -> wont fix status: open -> closed ___ Python tr

[issue8662] bytes join cannot join bytes

2010-05-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's not a very useful thing to join a single string, though. -- nosy: +pitrou ___ Python tracker ___ __

[issue8662] bytes join cannot join bytes

2010-05-08 Thread Timothy Pederick
New submission from Timothy Pederick : This code behaves as expected: >>> ' '.join('cat') 'c a t' This code does not: >>> b'\x00'.join(b'cat') Traceback (most recent call last): ... b'\x00'.join(b'cat') TypeError: sequence item 0: expected bytes, int found Instead, you have to do somethin