3 ms·
I'd be happy to be corrected on this, but the documentation seems a bit... bare? I've used mypy, and I'm interested in types more complicated than `foo() -> int
by uryga 8y ago
I'd be happy to be corrected on this, but the documentation seems a bit... bare? I've used mypy, and I'm interested in types more complicated than `foo() -> int`. I'd like to see how pyre handles generic stuff, unions etc... Maybe that's all rolled into "we support PEP X", but it'd be nice to see some examples.
(I might have somehow missed the full docs - in that case, if anyone has a link, I'd be grateful.)
- sinancepel 8y agoIf you're interested in the details of how pyre handles generics, unions, etc., you can take a look at the end-to-end typechecking tests, which provide lots of examples: https://github.com/facebook/pyre-check/blob/master/analysis/test/analysisTypeCheckTest.ml https://github.com/facebook/pyre-check/blob/master/analysis/...
- uryga 8y agoThanks! I'll dig into it later, as I've been looking for a tool like his, and it so happens that the details are interesting to me :) (I built my own namedtuple-style library for sum types, go figure). It didn't seem like the easiest reading though - that could make some potential users bounce... Are you working on docs that expose these features in a friendlier way? edit: Also, was I correct in that it's basically "The stuff that's specified in the PEP and works in mypy should work"?