Building understanding does not work on Pydev (Python)

{x for x in range(10)}

works fine on IDLE, but when I try to do this in eclipse (with the Pydev plugin), I get a syntax error:

Undefined variable: x

Is it because Pydev doesn’t support many concepts or something else? What can I do to make this work? (This was just one example that doesn't work. All settings for me don't work).

(I am using Python 3)

+3
source share
3 answers

This is a bug in PyDev; in this case, ignore the editor’s warning and execute the code: it will work.

I get it a lot, PyDev is not perfect, but it is good enough!

+3

, Pydev Python 3.

+2

, Python

import sys
sys.stdout.write( sys.version )
0

Source: https://habr.com/ru/post/1761762/


All Articles