Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: Is PyCharm broken? Or i am broken maybe? Or both?

Tags:

python

pycharm

PyCharm community edition 3.4.1 running for Python 2.7.8. Simple code:

def test(x):
    print x

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

Gives

d['test'](5)

'Null is not callable'

In the shell this code executes error-free.

like image 378
gargiulo2000 Avatar asked Nov 11 '22 00:11

gargiulo2000


1 Answers

The built-in inspection seems to be oversensitive (or buggy if you will).

If you try (d['test'])(5) then it won't complaint.

like image 81
Tomasz Zieliński Avatar answered Nov 14 '22 21:11

Tomasz Zieliński