Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Would a custom decorator work for you?


Unless I'm missing something entirely, what would that add? You still can't express the core information you need in the type system.


I meant only that you can insist a parameter has some quality when passed.


Good point, but I think we're talking past each other a bit.

Typing in python within the scientific world isn't ever used to check types. It's _strictly_ only documentation.

Yes, MyPy and whatnot exist, but not meaningfully. You literally can't use them for anything in this domain (they wont' run any of the code in question).

Types (in this subset of python) are 100% about documentation, 0% about enforcement.

We're setting up a _documentation_ system that can't express the core things it needs to. That worries me. Setting up type _checks_ is a completely different thing and not at all the goal.


I see makes sense. Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: