[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Fall back to pretty print in REPL #183

Open
MadameMinty opened this issue May 13, 2024 · 0 comments
Open

[feature] Fall back to pretty print in REPL #183

MadameMinty opened this issue May 13, 2024 · 0 comments

Comments

@MadameMinty
Copy link

In Python < 3.13 REPL:

>>> ic()
ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?

Suggestion: upon this error, fall back to pretty printing args & kwargs or current time if none, so that e.g. copy-pasting code fragments including icecream calls still yields some benefits, and it could be used to override builtin from icecream import ic as print in a pinch. Possibly update documentation to note this behavior since the error won't be informative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant