+ 8
Why the walrus_operator ':=' cannot be used in đ CCC, even though it works in đ Playgroundâïžđ€
Code Coach Challenge & Playground use the same version of đ: sys.version: 3.8.4 (default, Jul 14 2020, 03:07:46) [GCC 8.3.0] However, an attempt to use in the code a walrus_operator ':=' in đ CCC generates an error & the message: The code: print('True' if (w := 'PALINDROME') == w[::-1] else 'False') The message: Using variable'walrus' before assignment Everything works fine in đ PlaygroundâŒïžđđ
1 Resposta
+ 2
Thats strange and interesting...
I wonder if the CCC uses Pylint, theres a similar issue in Github. Nothings wrong with it but Pylint argues that it's wrong...
https://github.com/PyCQA/pylint/issues/3347