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

Issues with the Python writer #4299

Closed
zopyx opened this issue Jun 7, 2015 · 5 comments

Comments

@zopyx
Copy link

commented Jun 7, 2015

I tried Haxe 3.2 and found at least two issues:

  • the writer must use whitespaces instead of tabs for Python indentation. Tabs are considered by Python developers as evil
  • the generated Python code should specify the coding of the source files. Otherwise non-ascii literals with in the .hx file will cause a Python interpreter failure in Python 2.7 if the coding preamble is not specified.
@Simn

This comment has been minimized.

Copy link
Member

commented Jun 7, 2015

@frabbit: Any opinions?

@nadako

This comment has been minimized.

Copy link
Member

commented Jun 7, 2015

About tabs, yeah, pythonistas actually use 4-space instead.
About encoding, we only support python3 which IIRC has utf-8 by default so there's no need for -*- coding: utf-8 -*- header.

Simn added a commit that referenced this issue Jun 7, 2015
@Simn

This comment has been minimized.

Copy link
Member

commented Jun 7, 2015

I have replaced all occurrences of \t with four spaces now. I'm not sure if there's some inline python code that requires an update. Leaving that to @frabbit.

@frabbit

This comment has been minimized.

Copy link
Member

commented Jun 22, 2015

I can't find any inline python code that uses tabs, feel free to open a separate issue if you encounter tabs somewhere.

@frabbit frabbit closed this Jun 22, 2015
frabbit added a commit that referenced this issue Jun 22, 2015
@frabbit

This comment has been minimized.

Copy link
Member

commented Jun 22, 2015

i found one ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.