2018-05-18 13:32 GMT-03:00 Chris Barker via Python-ideas <[email protected]>:
> or would it operate on the whole sequence as a single collection of bits? Once you think as the whole sequence of bytes as a sequence of bits (eight times longer, of course), all questions are easly answered, see below... > Would it be any different? Without thinking hard, it seems some operations, > like AND and OR and XOR would be the same, but bit shifting would be > different. AND, XOR and OR are simple. Bit shifting will shift bits for the whole bit sequence. > And then what do you do if the two bytes objects are not the same length? Pad with 0s to the left. Exactly the same that happen in >>> 1 ^ 1231312312 1231312313 Regards, -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ Twitter: @facundobatista _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
