News for hackers. Stuff that matters.
Re:Parse, Don't Validate (2019) by kortex on Sunday June 27, 2021 @10:51AM (#27652024)
> x: typing.Union[str, typing.Any]

That's absolutely a valid and useful annotation. It tells me, and autocomplete, that "x" is probably a str, more likely than not, but I need to be aware that it might not be.

There are no comments on this comment yet.