0
votes

I am using eclipse with python bindings and there is a line that is showing as an error, even though it compiles and runs. I am guessing it has something to do with Python 2 vs. 3. The line in question is:

exec_dict = { **{"objectclass": objectclass}, **{"network_id": network_id}, **conditions }

I tried going into

Project > Options > PyDev - Interpreter/Grammar

and changing the Grammer Version to 3.0-3.5 and the interpreter to python_35, but it is still showing up as invalid syntax.

1
Do bad things happen if you comment this line out?Arndt Jonasson

1 Answers

0
votes

Well, I tried running that on Python and got:

python
Python 3.6.4 | packaged by conda-forge | (default, Dec 24 2017, 10:11:43) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exec_dict = { **{"objectclass"}: objectclass, **{"network_id": network_id}, **conditions }
  File "<stdin>", line 1
    exec_dict = { **{"objectclass"}: objectclass, **{"network_id": network_id}, **conditions }
                                   ^
SyntaxError: invalid syntax

So, it seems that the syntax is really invalid...