Re:Faster CPython (2021) [pdf]
by anticensor on Sunday January 23, 2022 @03:04PM
(#30049923)
Unlike JavaScript however, Python is strongly typed.
[ Parent
| on HN ]
Yeah but in practice basically all JS code in the wild is strongly typed since the community has long since decided that relying on implicit type coercion is a massive footgun.
Also I think Python’s truthy/falsey semantics make it dangerously close to being weakly typed.
Re:Faster CPython (2021) [pdf]
by staticassertion on Sunday January 23, 2022 @09:36PM
(#30053050)
All that means is that you get more exceptions raised when you use ==. It doesn't help performance at all, it doesn't even really confer anything about types, only that __eq__ is implemented between fewer types.
Re:Faster CPython (2021) [pdf]
by anticensor on Saturday February 05, 2022 @10:38AM
(#30222101)
Python exceptions are low-cost. It has to be that way because every for loop in Python throws an exception.