|
|
|
|
|
by whilenot-dev
25 days ago
|
|
The abstraction gets leaky once you expect the distinct NewTypes to adhere to the original inheritance property. I think that's a wrong assumption from the get-go. OP could just do: def foo(val: _A) -> None:
pass
...and it'll accept both NewTypes just fine. I guess it depends on whether foo is designed to be public or private. |
|