Skip to content

fix `generateSingleHeader.py` script #245

Closed
wants to merge 1 commit into from

4 participants

@Kosta-Github

It looks like the print function needs ( and ) around its argument (at least for me on Windows with Python 3.3.3).

Kosta fix `generateSingleHeader.py` script
It looks like the `print` function needs `(` and `)` around its argument (at least for me on Windows with `Python 3.3.3`).
30512c4
@PureAbstract

print became a function in Python 3.0; in the 2.x series, it was a keyword and didn't need the parens.

@martinmoene
Collaborator

See also Porting Python 2 Code to Python 3, Try to Support Python 2.6 and Newer Only:

from __future__ import print_function

This is a personal choice. 2to3 handles the translation from the print statement to the print function rather well so this is an optional step. This future statement does help, though, with getting used to typing print('Hello, World') instead of print 'Hello, World'.

@philsquared
Owner

Thanks guys. I didn't know that about print. I just checked and all my scripts are using the keyword form. I'll update them.
I currently have the generate script on the operating table, though, as I'm completely reworking it to take account of the new extractable micro-library support I'm adding (so Clara, initially, can also be a standalone library).
I might have to pause that work, though, as I have a couple of conference deadlines coming up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.