2014-11-05 11:30:34 -05:00
|
|
|
# test bytes + other
|
|
|
|
|
|
|
|
print(b"123" + b"456")
|
|
|
|
print(b"123" + bytearray(2))
|
2017-03-15 23:31:03 -04: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
|