gargiulo2000
gargiulo2000

Reputation: 63

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

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.

Upvotes: 5

Views: 254

Answers (1)

Tomasz Zieliński
Tomasz Zieliński

Reputation: 16367

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

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

Upvotes: 1

Related Questions