anyway just learned python typing invented a new kind of voldemort type -- one which when named doesn't actually name it

`float` and `int` are two distinct types in the type system

but if you write `x: float` that actually means `x: float | int`. but if you write `x: float | int` that means `x: float | int | int`.

anyway that's why `ty` has a `JustFloat` extension that is an actual alias for actual `float` that doesn't expand to `float | int`, so you can actual refer to... just float

play.ty.dev/a8714369-9b4c-4028

1
0
0

If you have a fediverse account, you can quote this note from your own instance. Search https://toot.cat/users/Gankra/statuses/115531411923558665 on your instance and quote it. (Note that quoting is not supported in Mastodon.)