@abhi9u to TechnologyEnglish • 7 months agoHow Python Compares Floats and Ints: When Equals Isn’t Really Equalblog.codingconfessions.comexternal-linkmessage-square43arrow-up1143arrow-down19cross-posted to: [email protected]
arrow-up1134arrow-down1external-linkHow Python Compares Floats and Ints: When Equals Isn’t Really Equalblog.codingconfessions.com@abhi9u to TechnologyEnglish • 7 months agomessage-square43cross-posted to: [email protected]
minus-square@SylvartaslinkEnglish1•7 months agoMeh. Imo anyone comparing an integer to a float and not expecting one of them to be implicitly casted to the other’s type will create that issue for themselves when doing the same thing with an explicit cast.
minus-square@[email protected]linkfedilinkEnglish3•7 months agoWhat I meant is, the former can be a genuine mistake, the latter is a conscious (probably uneducated) decision
Meh. Imo anyone comparing an integer to a float and not expecting one of them to be implicitly casted to the other’s type will create that issue for themselves when doing the same thing with an explicit cast.
What I meant is, the former can be a genuine mistake, the latter is a conscious (probably uneducated) decision