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

Interesting. Are the conditions checked at runtime on each call of the function?


Thanks! Yes, it is for runtime checking only


Then what's the advantage compared to normal assertions, which I think would be a lot more readable.

I think normally this sort of thing is useful so you can statically check stuff. If it's runtime only that seems a bit useless.


what is the performance overhead? especially on recursive calls


Let's say I did not put a focus on speed–and there will be a performance overhead ontop of the actual checks. In a production system, you should probably consider to deactivate it in performance-critical parts (evaluate=False)




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

Search: