Python: is PyCharm broken? Or maybe I am broke? Or both?

PyCharm community edition 3.4.1 for Python 2.7.8. Simple code:

def test(x): print x d={'test': test} d['test'](5) 

gives

 d['test'](5) 

'Null cannot be called'

In the shell, this code runs without errors.

+5
source share
1 answer

The built-in check seems too sensitive (or buggy if you do).

If you try (d['test'])(5) , then it will not complain.

+1
source

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


All Articles