Skip to content

Python 3 compatibility #550

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

Closed
pmav99 opened this issue Jul 7, 2015 · 0 comments
Closed

Python 3 compatibility #550

pmav99 opened this issue Jul 7, 2015 · 0 comments

Comments

@pmav99
Copy link

pmav99 commented Jul 7, 2015

Calling help with a python object results in:

help(int)

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/feanor/.virtualenvs/dem/lib/python3.4/site-packages/bpython/_internal.py", line 24, in __call__
    self.helper(*args, **kwargs)
  File "/usr/lib64/python3.4/pydoc.py", line 1827, in __call__
    self.help(request)
  File "/usr/lib64/python3.4/pydoc.py", line 1877, in help
    else: doc(request, 'Help on %s:', output=self._output)
  File "/usr/lib64/python3.4/pydoc.py", line 1614, in doc
    pager(render_doc(thing, title, forceload))
  File "/home/feanor/.virtualenvs/dem/lib/python3.4/site-packages/bpython/pager.py", line 54, in page
    if isinstance(data, unicode):
NameError: name 'unicode' is not defined

The relevant code is here

Is this appropriate way to fix it?

if py3:
    unicode = str
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