This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Amol Sharma
Recipients Amol Sharma
Date 2020-05-24.21:36:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590356197.08.0.726126426417.issue40760@roundup.psfhosted.org>
In-reply-to
Content
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 expected to have the use the // operator for integer division.

Please correct me if this is expected behavior!
History
Date User Action Args
2020-05-24 21:36:37Amol Sharmasetrecipients: + Amol Sharma
2020-05-24 21:36:37Amol Sharmasetmessageid: <1590356197.08.0.726126426417.issue40760@roundup.psfhosted.org>
2020-05-24 21:36:37Amol Sharmalinkissue40760 messages
2020-05-24 21:36:37Amol Sharmacreate