2014-11-05 16:30:34 +00:00
|
|
|
# test bytes + other
|
|
|
|
|
|
|
|
print(b"123" + b"456")
|
|
|
|
print(b"123" + bytearray(2))
|
2017-03-16 03:31:03 +00:00
|
|
|
|
|
|
|
print(b"123" + b"") # RHS is empty, can be optimised
|
|
|
|
print(b"" + b"123") # LHS is empty, can be optimised
|
|
|
|
print(b"" + bytearray(1)) # LHS is empty but can't be optimised
|