Skip to content

modified fix_unpacking.py for use in both python versions 2/3 #599

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

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

slycordinator
Copy link
Contributor

Changed fix_unpacking.py to use:

  • "unicode" function for python2
  • "str" function for python3

For me, this fixed the issue referenced in #549

…n and use the str function instead on python3
@slycordinator
Copy link
Contributor Author

slycordinator commented Feb 27, 2022

Though, for brevity, you may prefer something more like:

try:
    pre = unicode(num_pre)
    post = unicode(num_post)
except NameError:
    pre = str(num_pre)
    post = str(num_post)

Which seems to work the same.

@edschofield edschofield merged commit de68c10 into PythonCharmers:master Feb 21, 2024
@edschofield
Copy link
Contributor

Thanks for the fix, @slycordinator !

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

Successfully merging this pull request may close these issues.

2 participants