Y
Hacker News
new
|
ask
|
show
|
jobs
by
movpasd
326 days ago
In Python 3.12 syntax, you can use
type UserIs = UUID
1 comments
12_throw_away
326 days ago
`type UserId = UUID` creates a TypeAlias, not the same thing (from a type checker's point of view) as a NewType [1].
[1]
https://typing.python.org/en/latest/spec/aliases.html
link
[1] https://typing.python.org/en/latest/spec/aliases.html