Message324918
>>> b'\542\571\564\545\563', b'\142\171\164\145\163'
(b'bytes', b'bytes')
All the C compilers I know of at the very least generate a warning when one tries to assign an oct literal >= '\400' to a byte. And that's because it's nonsense when bytes have 8 bits, even more so for an 8 bit byte string.
The literal value:
>>> b'\542\571\564\545\563'
should be identical to:
>>> bytes([0o542, 0o571, 0o564, 0o545, 0o563])
That obviously doesn't work:
>>> b'\542\571\564\545\563' == bytes([0o542, 0o571, 0o564, 0o545, 0o563])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: bytes must be in range(0, 256)
This is on Windows/Intel. I haven't looked at the parser in much detail, but I wonder what would happen on a big-endian system? |
|
| Date |
User |
Action |
Args |
| 2018-09-10 11:57:43 | bup | set | recipients:
+ bup, paul.moore, tim.golden, zach.ware, steve.dower |
| 2018-09-10 11:57:43 | bup | set | messageid: <1536580663.47.0.56676864532.issue34620@psf.upfronthosting.co.za> |
| 2018-09-10 11:57:43 | bup | link | issue34620 messages |
| 2018-09-10 11:57:43 | bup | create | |
|