DidYouMean-Python
DidYouMean-Python copied to clipboard
executing, pure_eval, and futurecoder
Hi! I just came across this project, it looks very impressive! I thought I'd point out a couple of libraries I've written which could help make it even more powerful, if you're willing to add dependencies:
- https://github.com/alexmojaki/executing
- https://github.com/alexmojaki/pure_eval
For example this could allow you to get the AST node where an AttributeError occurred and the exact value that the user was trying to get an attribute of.
I'm currently developing futurecoder, a platform for free, interactive, high quality Python education for beginners. It includes convenient debugging with birdseye (which I noticed you starred) and snoop, an improved version of PySnooper (also starred). One feature I'd like to improve is tracebacks: https://github.com/alexmojaki/futurecoder/issues/75
In particular integrating DidYouMean into futurecoder would be great, but beyond that there's a huge space of very cool possibilities, and I thought this would be right up your alley. Are you interested?
Hello,
Thanks for your interest! still need to wrap my head around this as I'd rather keep this free of external dependencies but on the other hand, the new possibilities could be very nice indeed...
Your projects sound very nice and I'd be happy if they were to use DidYouMean or parts of it. However, I'd rather warn you that this project is just an unpolished POC that went a bit wild and I am not really sure how usable it would be in a real life environment ;-) Let me know if you need some help in any way.
I'll try to come back to you asap with more details.
Awesome!
In the meantime, I have overhauled tracebacks in futurecoder and introduced DidYouMean. It's working nicely! Occasionally there are exceptions but I can suppress them easily, and if it gives an unhelpful or incorrect suggestion I don't think it'll hinder students much. Take a look at https://github.com/alexmojaki/futurecoder/pull/77. You can try it out by clicking View Deployment and logging in with [email protected]:admin.