2 ms·
Im used to just doing x: list[str] if foo: x = [] And if a variable is nullable, I use a union: x: list[str] | None = None That’s much more reada
by 9dev 4y ago
Im used to just doing
x: list[str]
if foo:
x = []
And if a variable is nullable, I use a union:
x: list[str] | None = None
That’s much more readable to me!