0

Stop editing just to gain few points of reputations and not helping, thanks

First of all, it does not bother the compilation of my code. The command (base) user@machine:~$ python script.py works perfectly and gives what I expect.
What is bothering is during the edition of the code in Eclipse. While the following line is acceptable and compiled well with Python 3.7 a,b,c = *func_returns_2_things(),func_returns_1_thing().
What Eclipse warns : Encountered "*" at line X, column Y. Was expecting one of: "("..., "{"... #and so on
Of course, I tried this [*func_returns_2_things(),func_returns_1_thing()] but it still warns an error: Expected:].
Besides I shouldn't not say "warns" because warning are mentioned with a yellow triangle, and here this is clearly a red circle with red cross in (if you know what I mean).

What can I do to stop this useless warning in my Eclipse edition ?

Notes: def func_returns_2_things(): return 1,2 ; def func_returns_1_thing(): return 4


Versions
Eclipse IDE for Java Developers
Version: 2019-03 (4.11.0)
Build id: 20190314-1200

PyDev for Eclipse
Version: 7.3.0.201908161924
Build id:org.python.pydev.feature.feature.group
Provider: Fabio Zadrozny

Pydev Mylyn Integration
Version: 0.6.0
Build id:org.python.pydev.mylyn.feature.feature.group
Provider: Fabio Zadrozny

AvyWam
  • 890
  • 8
  • 28

1 Answers1

1

I think that the problem is probably that your project is configured to validate the syntax for a different version of Python.

i.e.: In the project properties, PyDev - Interpreter/Grammar you probably have an older version of Python selected (either in Grammar version or Additional syntax validation).

See: https://www.pydev.org/manual_101_project_conf2.html for more details.

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78
  • You were right. First, I checked in the menu `Window` -> `Preferences` -> `Pydev` -> `Interpreters` -> `Python interpreters`. By default it was selected a version in the root `/usr/bin/python` that I do not use and changed to the desired one `/path/anaconda/bin/python3.7`. Second, as you told, with a Right Click on the project, then clicking `Properties` - > `Pydev interpreter/grammar` I can change as I want which version to use: the default selected previously in First or another. Thank you! – AvyWam Apr 16 '21 at 10:20