Re:What the Fuck Python
by gpderetta on Saturday July 19, 2025 @07:19PM
(#44620402)
As mentioned else thread, the problem is not so much that book("false") evaluates to true, which is consistent with a lot of the language, but that int("1") evaluates to 1.
Generally python is much better than some other dynamic languages in avoiding stringly typed confusion, but the convenience of the int from string constructor set expectations that the rest of the language can't sanely meet.
String to type construction should have been relegated to a dedicated syntax in all cases.
Generally python is much better than some other dynamic languages in avoiding stringly typed confusion, but the convenience of the int from string constructor set expectations that the rest of the language can't sanely meet.
String to type construction should have been relegated to a dedicated syntax in all cases.