Message292409
| Author |
serhiy.storchaka |
| Recipients |
Arfrever, benjamin.peterson, docs@python, martin.panter, r.david.murray, rhettinger, serhiy.storchaka, vstinner, xiang.zhang, zbysz |
| Date |
2017年04月27日.07:05:22 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1493276722.75.0.96912630692.issue21071@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
After changing the type of Struct.format to str we perhaps should deprecate accepting bytes as format. Currently this can lead to emitting a BytesWarning.
$ ./python -Wa -b
>>> import struct
>>> struct.pack('I', 12345)
b'90\x00\x00'
>>> struct.pack(b'I', 12345)
__main__:1: BytesWarning: Comparison between bytes and string
__main__:1: BytesWarning: Comparison between bytes and string
b'90\x00\x00' |
|