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 steven.daprano
Recipients anthony-flury, steven.daprano
Date 2021-04-05.23:29:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617665348.47.0.0120262723246.issue43737@roundup.psfhosted.org>
In-reply-to
Content
> the result is different from other languages which is why it can be surprising.

Maybe the other languages should be documenting their surprising result, which fails to preserve the identity?

> Do we - add a warning to the [tutorial] page, or should we link to a new page that details and explains the behavior.

Neither. Warnings are for *dangerous or risky behaviour*, this is neither. And we surely don't need an entire new page just to document a minor piece of arithmetic behaviour.

The behaviour (although not the rationale for it) is already documented here:

https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations

although not here:

https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex

You could add a note to the table at the second link, and a FAQ next to this:

https://docs.python.org/3/faq/programming.html#why-does-22-10-return-3
History
Date User Action Args
2021-04-05 23:29:08steven.dapranosetrecipients: + steven.daprano, anthony-flury
2021-04-05 23:29:08steven.dapranosetmessageid: <1617665348.47.0.0120262723246.issue43737@roundup.psfhosted.org>
2021-04-05 23:29:08steven.dapranolinkissue43737 messages
2021-04-05 23:29:08steven.dapranocreate