Open ghost opened 10 years ago
What is happening is the first =
is signalling that the rest of the line is a Python expression that should be inserted. See the ruby docs.
The question then becomes if we are being too accepting in taking =expr
vs = expr
(note the space).
I am also surprised at the 2to3 being necessary; it has been a while since I worked on the Python 3 aspect of this package, but I remember getting it to work seamlessly in both.
maybe 2to3 wasn't necessary. It was ran before using/running PyHAML under py3, it found some py2 print statements though. Sorry about my carelessness.
And about the question, I guess decision is all yours! Thanks for the quick response + I leave this issue open so you can close it if you think it's not a major problem.
No apologies necessary. I'm not even sure it doesn't need 2to3 honestly. I'll take a look in the future.
The thing for me to check is if the Ruby HAML requires that space or not, and then do that.
I'll leave this open until I check that out.
Cheers,
Mike
On Jul 30, 2014, at 11:40 AM, Koosha Hosseiny notifications@github.com wrote:
maybe 2to3 wasn't necessary. It was ran before using/running PyHAML under py3, it found some py2 print statements though. Sorry about my carelessness.
And about the question, I guess decision is all yours! Thanks for the quick response + I leave this issue open so you can close it if you think it's not a major problem.
— Reply to this email directly or view it on GitHub.
hi
In this environment setup:
pserve development.ini
I put a open('/tmp/x', 'w').write(generate_mako(parse_string(source))) in init.py file to investigate it more, looking at the file 'x' I can see this comment which is by default in pyramid's page has turned to Mako expression:
Original in mytemplate.mako:
Output by PyHAML:
Simply removing the offending line like this:
fixed the problem (for now).
is this really an issue or did I miss something in the docs? That 2to3 thing seems fishy though. best wishes