gruns/icecream ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library called IceCream that makes debugging nicer than using print. I want an ic() helper that I can drop into code and it will show both the expression and its value, and when called with no arguments it should show where it was called from, like the file, line number, and function name. It should return whatever I pass into it so I can use it inside existing code without changing behavior.
Please make the output pretty and readable, with support for custom formatting, custom prefixes, sending output somewhere other than stderr, and turning it off and back on again. It should also have a way to install ic() so it works across files without importing it everywhere. Add a simple fallback style example for production use, and make sure there are solid tests for the main behaviors. If you need to, look up current Python docs online for any details.
Are you gonna build this?
make sure you review the code using coderabbit