Message219558
Serhiy wrote:
"I think that even if we accept this change (I am unsure in this), a warning should be raised only when bytes and unicode objects are equal. When they are not equal, a warning should not be raised, because this matches Python 3 behavior."
Python 3 warns even if strings are equal.
$ python3 -b -Wd
Python 3.3.2 (default, Mar 5 2014, 08:21:05)
e" for more information.
>>> b'abc' == 'abc'
__main__:1: BytesWarning: Comparison between bytes and string
False
>>> b'abc' == 'abc'
False
The warning is not repeat in the interactive interprter because it is emited twice at the same location "__main__:1". |
|
Date |
User |
Action |
Args |
2014-06-02 09:21:11 | vstinner | set | recipients:
+ vstinner, brett.cannon, ezio.melotti, Arfrever, cvrebert, jrincayc, serhiy.storchaka, Joshua.J.Cogliati |
2014-06-02 09:21:11 | vstinner | set | messageid: <1401700871.29.0.187366447733.issue21401@psf.upfronthosting.co.za> |
2014-06-02 09:21:11 | vstinner | link | issue21401 messages |
2014-06-02 09:21:10 | vstinner | create | |
|