adriank / ObjectPath

The agile query language for semi-structured data
http://objectpath.org
MIT License
380 stars 93 forks source link

Fixed missing parentheses to be Python3 compatible. #33

Closed PeterHeja closed 9 years ago

PeterHeja commented 9 years ago

There were missing parentheses, which rendered the shell unusable with Python3.

adriank commented 9 years ago

Thanks! I will be near computer next week. I will review it then. On Jun 25, 2015 9:54 AM, "Péter HÉJA" notifications@github.com wrote:

There were missing parentheses, which rendered the shell unusable with

Python3.

You can view, comment on, or merge this pull request online at:

https://github.com/adriank/ObjectPath/pull/33 Commit Summary

  • Fixed missing parantheses to be Python3 compatible.

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/adriank/ObjectPath/pull/33.

erikbgithub commented 9 years ago

Hi @PeterHeja, would you mind removing the space before the paranthesis? print() is a function in Python3+ and it should look like one.

@adriank If you use print statement in other places you can always surround it like if print would be a function. This way a lot of your code can be used in Python3+ and Python2 as well.

PeterHeja commented 9 years ago

Hello @erikb85, I know they are unnecessary, but the other print statements that I saw in the code were also "print ()" instead of "print()", so I thought I should follow the convention. I just looked around a bit more in the code, and found that it's inconsistent wether it's written with or without a space. I will remove it sometime soon, then. Thank you for your advice.

erikbgithub commented 9 years ago

It's reasonable. If all have the same format it's possible to change all at once later.

adriank commented 9 years ago

The parentheses were added automatically by 2to3. I haven't thoughtfully refactored the output since it's mess anyway. :)