G
G
Grigory Dikiy2015-12-27 15:41:09
Python
Grigory Dikiy, 2015-12-27 15:41:09

(Python) What's the problem?

aae8f37a4ce8410f907c80a7797457ec.png
Why does the linter always highlight the first pod. I just started learning Python, so I can't understand the problem.
3b381ea6ce3d4b5db0b91ec92c224932.png
Here is what is displayed in the status line:
37041a94ff1e48059d89551f23acb08b.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Kitaev, 2015-12-27
@frilix

Install PyCharm CE
Do not use sublime at all. Yes, perhaps a charm and an overhead for such scripts, but it will immediately point out many errors.
You delete superfluous obvious comments and superfluous code. You leave it like this:

#!/usr/bin/env python3
# coding: utf-8

db = {
    'bob': {'name': 'Bob Smith', 'age': 42, 'pay': 30000, 'job': 'dev'},
    'sue': {'name': 'Sue Jones', 'age': 45, 'pay': 40000, 'job': 'hdw'},
    'tom': {'name': 'Tom', 'age': 50, 'pay': 0, 'job': None},
}

if __name__ == '__main__':
    for k, v in db.items():
        print(k, '=>\n', v)

V
Vlad Feninets, 2015-12-27
@fnnzzz

try to save in utf-8 with BOM
tab 'File' - 'Save with encoding' - 'UTF-8 with bom'
should help

D
Denis, 2015-12-28
@denilenko

Sorry that is not the case, but tell me the name of the topic in the editor?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question