Replies: 1 comment 2 replies
-
I like this thought. (and generally, the idea about how symbolic stuff could help the REPL) Opinions about the interface?
Related, occasionally someone expresses an interest in invoking crosshair programmatically. There are some practical issues, but I think they are resolvable. At least currently, CrossHair causes some permanent brain damage to its host interpreter. The native datetime and json libraries currently get swapped with pure-python versions, for example. We'd also want to circumvent the auditwall stuff, because IIRC sys.addaudithook() is not undo-able. There is a likely another gotcha or two that I'm not recalling at the moment. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Say I'm in ptpython and I import a function
f
. (Maybef
has a contract, maybe it doesn't.) What I'd like to do is run a few lines of python code to create a precondition-postcondition pair and ask CrossHair whetherf
satisfies it. Currently to do this I'd have to create a new scratch file, write a wrapper function forf
with the exact same signature, add a contract, and run CrossHair maybe with thewatch
command.Beta Was this translation helpful? Give feedback.
All reactions