-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
More Unicode, factor out pprinting of labels and names #2005
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
Conversation
Ok, tests pass on 2.x and 3.x. I'd appreciate some feedback. next step is to replace all stringify, strify and variants hroughout the |
@wesm , can you give a general thumbs up/down on this PR? it's getting a little big, and I'm hesitant to put in more effort unless thanks |
Can you describe at a high-level what you're doing, how it changes the API, workflow etc.? Or point me to where you've already done that? Would help me to think about the impact of the changes without worrying (yet) about implementation details. |
sure. what's this for Unicode problems have been fixed many times before,but there are PR #1994 already picked some low-hanging fruit, mainly having to do with This PR focuses on consolidating the code for the general task of pprinting These changes have a few merits:
regarding the test removed by 65044e844ee88d98, I can see why it's useful
an example of the problem:
but a user would rather see something like:
...at least on consoles that support utf-8 or some suitable encoding, some future PR might require API changes, which can be discussed then. there are still more things to do, if one of the commiters gives an ack on this, |
# fix for IPython zmq frontends | ||
try: | ||
get_ipython() # ths will succeed under IPython | ||
encoding = 'utf=8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'utf-8'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strange,unicode.encode accepts that for some bizzare reason.
will fix.
This all looks perfectly in the right direction-- as you can see I never mustered the nerve to do this cleanup myself. Carry on |
I think this is the wrong behaviour, and it breaks some future unicode fixes. the constructor should should complain that no encoding was specified when the input is not ascii.
result should not change, unless unicode is present.
As this series is self-contained and makes no breaking changes, |
Good to go; merged into master |
addresses the same issue in 72ed09d applied to other occurences in the tree,
factored out the pprint code to a helper.
now supports pprinting of heterogeneous nested-nested-nested tuples with unicode strings,
FTW.