atom-community / atom-community/atom-script
Error when running max() in Atom
- Dominant language
- JavaScript
- Stars
- 730
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
when I try to run a max() function on a dictionary it returns the following error:
TypeError: 'dict' object is not callable
my code:
```
Company = {'GFG':10000, 'Hashd':2292, 'Infy': 200}
# taking list of car values in v
v = list(Company.values())
# taking list of car keys in v
k = list(Company.keys())
m = max(5, 10)
print(k[v.index(max(v))])
>>> Traceback (most recent call last):
>>> File ".../Test_Multiindex_DF.py", line 55, in m = max(5, 10)
>>> TypeError: 'dict' object is not callable
```
my system with atom:
```
print(sys.version)
>>>3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
>>>[Clang 6.0 (clang-600.0.57)]
```
running the same scipt in the terminal won't return an error but gives the right answer:
`>>>GFG`
```
sys.version
>>> 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
>>> [Clang 6.0 (clang-600.0.57)]
```
Thanks for your support,
Jesse
Contributor guide
Assessment
This issue has not been assessed yet.