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

bug in file __init__.py #18

Open
wannaphong opened this issue Aug 10, 2015 · 6 comments
Open

bug in file __init__.py #18

wannaphong opened this issue Aug 10, 2015 · 6 comments

Comments

@wannaphong
Copy link

I want to install hask. On Python 3.4.3 64 bit in windows 8.1
I using

git clone https://github.com/billpmurphy/hask
cd hask
python setup.py install

but

Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    import hask
  File "C:\Users\วรรณพงษ์\hask\hask\__init__.py", line 8, in <module>
    import lang
ImportError: No module named 'lang'

No module named 'lang'.

@billpmurphy
Copy link
Owner

Hask is only compatible with Python 2.7 at the moment, but Python 3 support is coming soon.

@pya
Copy link
Contributor

pya commented Aug 10, 2015

I played with Python 3 bit:

The main issues are:

  • relative imports
  • __div__ (and __rdiv__) is gone because is integer division is gone and / acts like //
  • long is gone
  • unicode --> str, str --> bytes
  • cmp is gone, use comp = (a > b) - (a < b)
  • use string.ascii_uppercase instead of string.uppercase
  • many types not in the types module anymore

@justanr
Copy link

justanr commented Aug 10, 2015

Is there a roadmap for Py3 compatibility?

@billpmurphy
Copy link
Owner

Since there seems to be a lot of interest, I will try to work on this ASAP. I didn't have a particular roadmap in mind besides starting with lang and working outwards. Pull requests that make progress will definitely get merged.

@pya
Copy link
Contributor

pya commented Aug 12, 2015

In my opinion Python-Future is the best way for a single source approach. You can go module by module and always have a running Python 2 version with lots of Python-3-like features. I think it is better than the library six.

@billpmurphy
Copy link
Owner

Thanks--I have been reading about the tradeoffs between Python-Future and six, and this is a helpful recommendation.

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

No branches or pull requests

4 participants