[issue40760] Dictionary comprehension using older division behavior

2020-05-24 Thread Amol Sharma
Amol Sharma added the comment: My apologies! I didn't realize I was in a different environment which was actually 2.7. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue40760] Dictionary comprehension using older division behavior

2020-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: That's not what I see: $ python3.8 Python 3.8.0b4 (default, Sep 15 2019, 15:56:44) [GCC 7.4.0] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> some_dict = {3:4} >>> {k: v/5 for k, v in some_dict.items()} {3: 0.8} >>> Grante

[issue40760] Dictionary comprehension using older division behavior

2020-05-24 Thread Amol Sharma
New submission from Amol Sharma : Using comprehension to divide all the values in a dictionary like in the following results in integer division in 3.8. some_dict = {k: v/5 for k, v in some_dict.items()} This was solved by changing 5 to 5.0, reflecting behavior from python2. I would have exp