-
Notifications
You must be signed in to change notification settings - Fork 20
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
Short class names #64
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see this issue has come up before, in #27, so forgive me if you've already considered this and rejected it.
Description
It would be great if we could write something like:
And then instead of class names like the following in the output of
prettyprinter.pformat
:I'd want to see instead:
Sometimes fully qualified class names (with the module name) get pretty long and obscure the content. In my case, most/all of the classes involved are dataclasses, but from the code it looks like that's not relevant.
I realize you can register your own prettyprinters -- which I've also used for one of my classes -- but for this purpose that seems high-effort and perhaps error-prone. I ended up just editing the source code to never print class names as fully qualified, and that's great for what I'm doing right now.
Even nicer (but likely straying into a separate feature request), I'd love to be able to write something like this and not mutate any global state:
The text was updated successfully, but these errors were encountered: