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
print(…, sep=…) raises SyntaxError #777
Comments
Hmm, I think I can see where this is coming from. We parse the code with I think I can see a way round it - I'll hopefully have a go later today. |
See PR #784. Sorry I didn't get round to it on Thursday - it's been a busy few days. |
Thanks, that's great! |
Hi, I just started learning python and came across the same error as described below:
I'm using python 2.7.14 on macosx High Sierra v 10.13.2. I just can't get past it. The sep is argument present in print object but it's just not working on my machine. Please help @takluyver @lebigot |
I'd recommend using Python 3. If you can't for some reason, use |
To add to @takluyver's response, @bhandariaditya: you are quoting Python 3 code but use a Python 2 interpreter. You thus have three options (starting with the most modern one):
|
@takluyver thanks @lebigot thanks a lot, the last version worked using print div.join(map(str, [row,row,row])).
|
With IPython 0.11 (Mac OS X Lion, installed via Fink) and Python 2.7, the print() function raises a strange SyntaxError:
The name print seems to be correctly defined:
I'm not sure whether this matters, but the failure happens with both autocall on and off.
The text was updated successfully, but these errors were encountered: