Craig Rodrigues <rodr...@freebsd.org>: > Make this return a list on Python 3, like in Python 2: [(yield 1) for x in > range(10)]
Give Python 2 a little more credit. Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> [(yield 1) for x in range(10)] File "<stdin>", line 1 SyntaxError: 'yield' outside function regards, Anders _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com