According to PEP 358, a bytes object is used to store a mutable sequence of bytes (0-255), raising if this is not the case.
However, my python 2.7 says otherwise
>>> bytes([1,2,3])
'[1, 2, 3]'
>>> bytes([280])
'[280]'
>>> bytes is str
True
>>> bytes
<type 'str'>
Does anyone have a clue on the reason why the PEP is declared Final, but the implementation does not conform ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…